OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "Test.h" | 8 #include "Test.h" |
9 #include "TestClassDef.h" | |
10 #include "SkString.h" | 9 #include "SkString.h" |
11 #include <stdarg.h> | 10 #include <stdarg.h> |
12 #include <stdio.h> | 11 #include <stdio.h> |
13 | 12 |
14 // Windows vsnprintf doesn't 0-terminate safely), but is so far | 13 // Windows vsnprintf doesn't 0-terminate safely), but is so far |
15 // encapsulated in SkString that we can't test it directly. | 14 // encapsulated in SkString that we can't test it directly. |
16 | 15 |
17 #ifdef SK_BUILD_FOR_WIN | 16 #ifdef SK_BUILD_FOR_WIN |
18 #define VSNPRINTF(buffer, size, format, args) \ | 17 #define VSNPRINTF(buffer, size, format, args) \ |
19 vsnprintf_s(buffer, size, _TRUNCATE, format, args) | 18 vsnprintf_s(buffer, size, _TRUNCATE, format, args) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 191 |
193 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results); | 192 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results); |
194 REPORTER_ASSERT(r, results.count() == 6); | 193 REPORTER_ASSERT(r, results.count() == 6); |
195 REPORTER_ASSERT(r, results[0].equals("a")); | 194 REPORTER_ASSERT(r, results[0].equals("a")); |
196 REPORTER_ASSERT(r, results[1].equals("b")); | 195 REPORTER_ASSERT(r, results[1].equals("b")); |
197 REPORTER_ASSERT(r, results[2].equals("c")); | 196 REPORTER_ASSERT(r, results[2].equals("c")); |
198 REPORTER_ASSERT(r, results[3].equals("dee")); | 197 REPORTER_ASSERT(r, results[3].equals("dee")); |
199 REPORTER_ASSERT(r, results[4].equals("f")); | 198 REPORTER_ASSERT(r, results[4].equals("f")); |
200 REPORTER_ASSERT(r, results[5].equals("g")); | 199 REPORTER_ASSERT(r, results[5].equals("g")); |
201 } | 200 } |
OLD | NEW |