Index: tests/RTConfRegistryTest.cpp |
diff --git a/tests/RTConfRegistryTest.cpp b/tests/RTConfRegistryTest.cpp |
index f42281fa22f9bb75aa8e31aa3b5807b495b07556..2b61256f5b99c1f787d2b49381b9af971532288d 100644 |
--- a/tests/RTConfRegistryTest.cpp |
+++ b/tests/RTConfRegistryTest.cpp |
@@ -8,8 +8,21 @@ |
#include "SkRTConf.h" |
#include "Test.h" |
-DEF_TEST(SkRTConfRegistry, reporter) { |
-#ifdef SK_SUPPORT_UNITTEST |
- SkRTConfRegistry::UnitTest(); |
+#ifdef SK_BUILD_FOR_WIN32 |
+static void sk_setenv(const char* key, const char* value) { |
+ _putenv_s(key, value); |
+} |
+#else |
+static void sk_setenv(const char* key, const char* value) { |
+ setenv(key, value, 1); |
+} |
#endif |
+ |
+DEF_TEST(SkRTConfRegistry, reporter) { |
+ SkRTConfRegistry registryWithoutContents; |
+ |
+ sk_setenv("skia_nonexistent_item", "132"); |
+ int result = 0; |
+ registryWithoutContents.parse("nonexistent.item", &result); |
+ SkASSERT(result == 132); |
mtklein
2014/08/07 12:26:14
REPORTER_ASSERT?
tfarina
2014/08/07 14:11:27
Done.
|
} |