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

Side by Side Diff: tests/UtilsTest.cpp

Issue 18721006: fix trivial matrix computation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « tests/FitsInTest.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkRefCnt.h" 10 #include "SkRefCnt.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 tmp[0] = &obj0; 64 tmp[0] = &obj0;
65 tmp[1] = &obj1; 65 tmp[1] = &obj1;
66 REPORTER_ASSERT(reporter, 2 == obj0.getRefCnt()); 66 REPORTER_ASSERT(reporter, 2 == obj0.getRefCnt());
67 REPORTER_ASSERT(reporter, 2 == obj1.getRefCnt()); 67 REPORTER_ASSERT(reporter, 2 == obj1.getRefCnt());
68 68
69 // test out reset with data in the array (and a new allocation) 69 // test out reset with data in the array (and a new allocation)
70 tmp.reset(0); 70 tmp.reset(0);
71 REPORTER_ASSERT(reporter, 0 == tmp.count()); 71 REPORTER_ASSERT(reporter, 0 == tmp.count());
72 REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt()); 72 REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
73 REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt()); 73 REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
74 74
75 tmp.reset(2); // this should use the preexisting allocation 75 tmp.reset(2); // this should use the preexisting allocation
76 REPORTER_ASSERT(reporter, 2 == tmp.count()); 76 REPORTER_ASSERT(reporter, 2 == tmp.count());
77 tmp[0] = &obj0; 77 tmp[0] = &obj0;
78 tmp[1] = &obj1; 78 tmp[1] = &obj1;
79 } 79 }
80 80
81 // test out destructor with data in the array (and using existing allocation ) 81 // test out destructor with data in the array (and using existing allocation )
82 REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt()); 82 REPORTER_ASSERT(reporter, 1 == obj0.getRefCnt());
83 REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt()); 83 REPORTER_ASSERT(reporter, 1 == obj1.getRefCnt());
84 84
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 test_utf16(reporter); 219 test_utf16(reporter);
220 test_search(reporter); 220 test_search(reporter);
221 test_autounref(reporter); 221 test_autounref(reporter);
222 test_autostarray(reporter); 222 test_autostarray(reporter);
223 } 223 }
224 224
225 #include "TestClassDef.h" 225 #include "TestClassDef.h"
226 DEFINE_TESTCLASS("Utils", UtfTestClass, TestUTF) 226 DEFINE_TESTCLASS("Utils", UtfTestClass, TestUTF)
OLDNEW
« no previous file with comments | « tests/FitsInTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698