OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
| 7 |
8 #include "Test.h" | 8 #include "Test.h" |
| 9 #include "TestClassDef.h" |
9 #include "SkRandom.h" | 10 #include "SkRandom.h" |
10 #include "SkOSFile.h" | 11 #include "SkOSFile.h" |
11 #include "SkStream.h" | 12 #include "SkStream.h" |
12 #include "SkData.h" | 13 #include "SkData.h" |
13 | 14 |
14 #ifndef SK_BUILD_FOR_WIN | 15 #ifndef SK_BUILD_FOR_WIN |
15 #include <unistd.h> | 16 #include <unistd.h> |
16 #include <fcntl.h> | 17 #include <fcntl.h> |
17 #endif | 18 #endif |
18 | 19 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 static void TestNullData() { | 181 static void TestNullData() { |
181 SkData* nullData = NULL; | 182 SkData* nullData = NULL; |
182 SkMemoryStream memStream(nullData); | 183 SkMemoryStream memStream(nullData); |
183 TestDereferencingData(&memStream); | 184 TestDereferencingData(&memStream); |
184 | 185 |
185 memStream.setData(nullData); | 186 memStream.setData(nullData); |
186 TestDereferencingData(&memStream); | 187 TestDereferencingData(&memStream); |
187 | 188 |
188 } | 189 } |
189 | 190 |
190 static void TestStreams(skiatest::Reporter* reporter) { | 191 DEF_TEST(Stream, reporter) { |
191 TestWStream(reporter); | 192 TestWStream(reporter); |
192 TestPackedUInt(reporter); | 193 TestPackedUInt(reporter); |
193 TestNullData(); | 194 TestNullData(); |
194 } | 195 } |
195 | |
196 #include "TestClassDef.h" | |
197 DEFINE_TESTCLASS("Stream", StreamTestClass, TestStreams) | |
OLD | NEW |