OLD | NEW |
---|---|
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 | 7 |
8 #include "SkRTConf.h" | 8 #include "SkRTConf.h" |
9 #include "Test.h" | 9 #include "Test.h" |
10 | 10 |
11 #ifdef SK_BUILD_FOR_WIN32 | |
12 static void sk_setenv(const char* key, const char* value) { | |
13 _putenv_s(key, value); | |
14 } | |
15 #else | |
16 static void sk_setenv(const char* key, const char* value) { | |
17 setenv(key, value, 1); | |
18 } | |
19 #endif | |
20 | |
11 DEF_TEST(SkRTConfRegistry, reporter) { | 21 DEF_TEST(SkRTConfRegistry, reporter) { |
12 #ifdef SK_SUPPORT_UNITTEST | 22 SkRTConfRegistry registryWithoutContents; |
13 SkRTConfRegistry::UnitTest(); | 23 |
14 #endif | 24 sk_setenv("skia_nonexistent_item", "132"); |
25 int result = 0; | |
26 registryWithoutContents.parse("nonexistent.item", &result); | |
27 SkASSERT(result == 132); | |
mtklein
2014/08/07 12:26:14
REPORTER_ASSERT?
tfarina
2014/08/07 14:11:27
Done.
| |
15 } | 28 } |
OLD | NEW |