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

Side by Side Diff: tests/OnceTest.cpp

Issue 1705583003: clean up more dead code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 10 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 | « src/utils/SkSHA1.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | 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 "SkOnce.h" 8 #include "SkOnce.h"
9 #include "SkRunnable.h"
10 #include "SkTaskGroup.h" 9 #include "SkTaskGroup.h"
11 #include "Test.h" 10 #include "Test.h"
12 11
13 static void add_five(int* x) { 12 static void add_five(int* x) {
14 *x += 5; 13 *x += 5;
15 } 14 }
16 15
17 SK_DECLARE_STATIC_ONCE(st_once); 16 SK_DECLARE_STATIC_ONCE(st_once);
18 DEF_TEST(SkOnce_Singlethreaded, r) { 17 DEF_TEST(SkOnce_Singlethreaded, r) {
19 int x = 0; 18 int x = 0;
(...skipping 24 matching lines...) Expand all
44 static int gX = 0; 43 static int gX = 0;
45 static void inc_gX() { gX++; } 44 static void inc_gX() { gX++; }
46 45
47 SK_DECLARE_STATIC_ONCE(noarg_once); 46 SK_DECLARE_STATIC_ONCE(noarg_once);
48 DEF_TEST(SkOnce_NoArg, r) { 47 DEF_TEST(SkOnce_NoArg, r) {
49 SkOnce(&noarg_once, inc_gX); 48 SkOnce(&noarg_once, inc_gX);
50 SkOnce(&noarg_once, inc_gX); 49 SkOnce(&noarg_once, inc_gX);
51 SkOnce(&noarg_once, inc_gX); 50 SkOnce(&noarg_once, inc_gX);
52 REPORTER_ASSERT(r, 1 == gX); 51 REPORTER_ASSERT(r, 1 == gX);
53 } 52 }
OLDNEW
« no previous file with comments | « src/utils/SkSHA1.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698