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

Side by Side Diff: tests/RTConfRegistryTest.cpp

Issue 444303002: Migrate SkRTConfRegistry test to DEF_TEST(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« include/utils/SkRTConf.h ('K') | « src/utils/SkRTConf.cpp ('k') | no next file » | 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 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 }
OLDNEW
« include/utils/SkRTConf.h ('K') | « src/utils/SkRTConf.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698