OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 6185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6196 len = str3->WriteAscii(buf); | 6196 len = str3->WriteAscii(buf); |
6197 CHECK_EQ(7, len); | 6197 CHECK_EQ(7, len); |
6198 CHECK_EQ(0, strcmp("abc def", buf)); | 6198 CHECK_EQ(0, strcmp("abc def", buf)); |
6199 | 6199 |
6200 memset(buf, 0x1, sizeof(buf)); | 6200 memset(buf, 0x1, sizeof(buf)); |
6201 len = str3->WriteAscii(buf, 0, -1, String::PRESERVE_ASCII_NULL); | 6201 len = str3->WriteAscii(buf, 0, -1, String::PRESERVE_ASCII_NULL); |
6202 CHECK_EQ(7, len); | 6202 CHECK_EQ(7, len); |
6203 CHECK_EQ(0, strcmp("abc", buf)); | 6203 CHECK_EQ(0, strcmp("abc", buf)); |
6204 CHECK_EQ(0, buf[3]); | 6204 CHECK_EQ(0, buf[3]); |
6205 CHECK_EQ(0, strcmp("def", buf + 4)); | 6205 CHECK_EQ(0, strcmp("def", buf + 4)); |
| 6206 |
| 6207 CHECK_EQ(0, str->WriteAscii(NULL, 0, 0, String::NO_NULL_TERMINATION)); |
| 6208 CHECK_EQ(0, str->WriteUtf8(NULL, 0, 0, String::NO_NULL_TERMINATION)); |
| 6209 CHECK_EQ(0, str->Write(NULL, 0, 0, String::NO_NULL_TERMINATION)); |
6206 } | 6210 } |
6207 | 6211 |
6208 | 6212 |
6209 static void Utf16Helper( | 6213 static void Utf16Helper( |
6210 LocalContext& context, | 6214 LocalContext& context, |
6211 const char* name, | 6215 const char* name, |
6212 const char* lengths_name, | 6216 const char* lengths_name, |
6213 int len) { | 6217 int len) { |
6214 Local<v8::Array> a = | 6218 Local<v8::Array> a = |
6215 Local<v8::Array>::Cast(context->Global()->Get(v8_str(name))); | 6219 Local<v8::Array>::Cast(context->Global()->Get(v8_str(name))); |
(...skipping 11904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18120 }; | 18124 }; |
18121 | 18125 |
18122 i::Semaphore* sem_; | 18126 i::Semaphore* sem_; |
18123 volatile int sem_value_; | 18127 volatile int sem_value_; |
18124 }; | 18128 }; |
18125 | 18129 |
18126 | 18130 |
18127 THREADED_TEST(SemaphoreInterruption) { | 18131 THREADED_TEST(SemaphoreInterruption) { |
18128 ThreadInterruptTest().RunTest(); | 18132 ThreadInterruptTest().RunTest(); |
18129 } | 18133 } |
| 18134 |
18130 #endif // WIN32 | 18135 #endif // WIN32 |
OLD | NEW |