Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: gpu/config/gpu_control_list_number_info_unittest.cc

Issue 194303002: Blacklist GLX indirect rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/config/gpu_control_list_format.txt ('k') | gpu/config/gpu_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/config/gpu_control_list.h" 5 #include "gpu/config/gpu_control_list.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace gpu { 8 namespace gpu {
9 9
10 class NumberInfoTest : public testing::Test { 10 class NumberInfoTest : public testing::Test {
11 public: 11 public:
12 NumberInfoTest() { } 12 NumberInfoTest() { }
13 virtual ~NumberInfoTest() { } 13 virtual ~NumberInfoTest() { }
14 14
15 typedef GpuControlList::FloatInfo FloatInfo; 15 typedef GpuControlList::FloatInfo FloatInfo;
16 typedef GpuControlList::IntInfo IntInfo; 16 typedef GpuControlList::IntInfo IntInfo;
17 typedef GpuControlList::BoolInfo BoolInfo;
17 }; 18 };
18 19
19 TEST_F(NumberInfoTest, ValidFloatInfo) { 20 TEST_F(NumberInfoTest, ValidFloatInfo) {
20 const std::string op[] = { 21 const std::string op[] = {
21 "=", 22 "=",
22 "<", 23 "<",
23 "<=", 24 "<=",
24 ">", 25 ">",
25 ">=", 26 ">=",
26 "any", 27 "any",
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 { 200 {
200 IntInfo info("between", "3", "5"); 201 IntInfo info("between", "3", "5");
201 EXPECT_TRUE(info.Contains(3)); 202 EXPECT_TRUE(info.Contains(3));
202 EXPECT_TRUE(info.Contains(5)); 203 EXPECT_TRUE(info.Contains(5));
203 EXPECT_TRUE(info.Contains(4)); 204 EXPECT_TRUE(info.Contains(4));
204 EXPECT_FALSE(info.Contains(6)); 205 EXPECT_FALSE(info.Contains(6));
205 EXPECT_FALSE(info.Contains(2)); 206 EXPECT_FALSE(info.Contains(2));
206 } 207 }
207 } 208 }
208 209
210 TEST_F(NumberInfoTest, Bool) {
211 {
212 BoolInfo info(true);
213 EXPECT_TRUE(info.Contains(true));
214 EXPECT_FALSE(info.Contains(false));
215 }
216 {
217 BoolInfo info(false);
218 EXPECT_FALSE(info.Contains(true));
219 EXPECT_TRUE(info.Contains(false));
220 }
221 }
222
209 } // namespace gpu 223 } // namespace gpu
210 224
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list_format.txt ('k') | gpu/config/gpu_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698