Chromium Code Reviews| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 using ::v8::Persistent; | 75 using ::v8::Persistent; |
| 76 using ::v8::Script; | 76 using ::v8::Script; |
| 77 using ::v8::StackTrace; | 77 using ::v8::StackTrace; |
| 78 using ::v8::String; | 78 using ::v8::String; |
| 79 using ::v8::TryCatch; | 79 using ::v8::TryCatch; |
| 80 using ::v8::Undefined; | 80 using ::v8::Undefined; |
| 81 using ::v8::V8; | 81 using ::v8::V8; |
| 82 using ::v8::Value; | 82 using ::v8::Value; |
| 83 | 83 |
| 84 | 84 |
| 85 static void ExpectString(const char* code, const char* expected) { | |
|
rossberg
2012/12/18 13:35:58
For consistency, perhaps move the following Expect
| |
| 86 Local<Value> result = CompileRun(code); | |
| 87 CHECK(result->IsString()); | |
| 88 String::AsciiValue ascii(result); | |
| 89 CHECK_EQ(expected, *ascii); | |
| 90 } | |
| 91 | |
| 92 static void ExpectInt32(const char* code, int expected) { | 85 static void ExpectInt32(const char* code, int expected) { |
| 93 Local<Value> result = CompileRun(code); | 86 Local<Value> result = CompileRun(code); |
| 94 CHECK(result->IsInt32()); | 87 CHECK(result->IsInt32()); |
| 95 CHECK_EQ(expected, result->Int32Value()); | 88 CHECK_EQ(expected, result->Int32Value()); |
| 96 } | 89 } |
| 97 | 90 |
| 98 static void ExpectBoolean(const char* code, bool expected) { | 91 static void ExpectBoolean(const char* code, bool expected) { |
| 99 Local<Value> result = CompileRun(code); | 92 Local<Value> result = CompileRun(code); |
| 100 CHECK(result->IsBoolean()); | 93 CHECK(result->IsBoolean()); |
| 101 CHECK_EQ(expected, result->BooleanValue()); | 94 CHECK_EQ(expected, result->BooleanValue()); |
| (...skipping 17995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 18097 | 18090 |
| 18098 i::Semaphore* sem_; | 18091 i::Semaphore* sem_; |
| 18099 volatile int sem_value_; | 18092 volatile int sem_value_; |
| 18100 }; | 18093 }; |
| 18101 | 18094 |
| 18102 | 18095 |
| 18103 THREADED_TEST(SemaphoreInterruption) { | 18096 THREADED_TEST(SemaphoreInterruption) { |
| 18104 ThreadInterruptTest().RunTest(); | 18097 ThreadInterruptTest().RunTest(); |
| 18105 } | 18098 } |
| 18106 #endif // WIN32 | 18099 #endif // WIN32 |
| OLD | NEW |