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

Side by Side Diff: tests/RuntimeConfigTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 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 | « tests/RoundRectTest.cpp ('k') | tests/SHA1Test.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SkRTConf.h" 7 #include "SkRTConf.h"
8 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
10 9
11 SK_CONF_DECLARE(int, c_RTConfTestVariable, 10 SK_CONF_DECLARE(int, c_RTConfTestVariable,
12 "test.utils.rtconf.testVariable", 1, 11 "test.utils.rtconf.testVariable", 1,
13 "This is only a test. Do not be alarmed."); 12 "This is only a test. Do not be alarmed.");
14 // TODO(skia-team): more comprehensive unit tests of the SkRTConf 13 // TODO(skia-team): more comprehensive unit tests of the SkRTConf
15 // system. 14 // system.
16 DEF_TEST(RuntimeConfig, reporter) { 15 DEF_TEST(RuntimeConfig, reporter) {
17 REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable); 16 REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable);
18 17
19 SK_CONF_SET("test.utils.rtconf.testVariable", 2); 18 SK_CONF_SET("test.utils.rtconf.testVariable", 2);
20 #ifdef SK_DEVELOPER 19 #ifdef SK_DEVELOPER
21 REPORTER_ASSERT(reporter, 2 == c_RTConfTestVariable); 20 REPORTER_ASSERT(reporter, 2 == c_RTConfTestVariable);
22 #else // not SK_DEVELOPER 21 #else // not SK_DEVELOPER
23 // Can not change RTConf variables in Release. 22 // Can not change RTConf variables in Release.
24 REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable); 23 REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable);
25 #endif // SK_DEVELOPER 24 #endif // SK_DEVELOPER
26 25
27 // This should not give a warning. 26 // This should not give a warning.
28 SK_CONF_TRY_SET("test.utils.rtconf.nonexistentVariable", 7); 27 SK_CONF_TRY_SET("test.utils.rtconf.nonexistentVariable", 7);
29 } 28 }
OLDNEW
« no previous file with comments | « tests/RoundRectTest.cpp ('k') | tests/SHA1Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698