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

Side by Side Diff: tests/RuntimeConfigTest.cpp

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

Powered by Google App Engine
This is Rietveld 408576698