28d5bdd97e
Reason for revert: still blocking DEPS roll Original issue's description: > Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER. > > The Release_Developer build type is now used to build Skia with > release level optimizations but still enable SK_DEBUG. This in turn > means that SkASSERTS and SkRTConf are available in this mode. > > Further we can then remove SK_DEVELOPER as a define as it is true > iff SK_DEBUG is true. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927583002 > DOCS_PREVIEW= https://skia.org/?cl=1927583002 > > Committed: https://skia.googlesource.com/skia/+/48d6f88479e72efaf9b9d8f9c0769acb1ba773db TBR=bungeman@gmail.com,bungeman@google.com,benjaminwagner@google.com,djsollen@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1918253006
29 lines
912 B
C++
29 lines
912 B
C++
/*
|
|
* Copyright 2013 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#include "SkRTConf.h"
|
|
#include "Test.h"
|
|
|
|
SK_CONF_DECLARE(int, c_RTConfTestVariable,
|
|
"test.utils.rtconf.testVariable", 1,
|
|
"This is only a test. Do not be alarmed.");
|
|
// TODO(skia-team): more comprehensive unit tests of the SkRTConf
|
|
// system.
|
|
DEF_TEST(RuntimeConfig, reporter) {
|
|
REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable);
|
|
|
|
SK_CONF_SET("test.utils.rtconf.testVariable", 2);
|
|
#ifdef SK_DEVELOPER
|
|
REPORTER_ASSERT(reporter, 2 == c_RTConfTestVariable);
|
|
#else // not SK_DEVELOPER
|
|
// Can not change RTConf variables in Release.
|
|
REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable);
|
|
#endif // SK_DEVELOPER
|
|
|
|
// This should not give a warning.
|
|
SK_CONF_TRY_SET("test.utils.rtconf.nonexistentVariable", 7);
|
|
}
|