Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 DEPENDENT_TEST(DeserializeExtensions, Serialize) { | 279 DEPENDENT_TEST(DeserializeExtensions, Serialize) { |
| 280 v8::HandleScope scope; | 280 v8::HandleScope scope; |
| 281 | 281 |
| 282 Deserialize(); | 282 Deserialize(); |
| 283 const char* c_source = "gc();"; | 283 const char* c_source = "gc();"; |
| 284 v8::Local<v8::String> source = v8::String::New(c_source); | 284 v8::Local<v8::String> source = v8::String::New(c_source); |
| 285 v8::Local<v8::Script> script = v8::Script::Compile(source); | 285 v8::Local<v8::Script> script = v8::Script::Compile(source); |
| 286 v8::Local<v8::Value> value = script->Run(); | 286 v8::Local<v8::Value> value = script->Run(); |
| 287 CHECK(value->IsUndefined()); | 287 CHECK(value->IsUndefined()); |
| 288 } | 288 } |
| 289 | |
| 290 | |
| 291 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...); | |
|
Kasper Lund
2009/10/22 13:33:28
Is that really necessary? You trust V8_Fatal over
| |
| 292 | |
| 293 | |
| 294 TEST(TestThatAlwaysSucceeds) { | |
| 295 } | |
| 296 | |
| 297 | |
| 298 TEST(TestThatAlwaysFails) { | |
| 299 V8_Fatal(__FILE__, __LINE__, "Artificial failure"); | |
| 300 } | |
| 301 | |
| 302 | |
| 303 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | |
| 304 V8_Fatal(__FILE__, __LINE__, "Artificial failure2"); | |
| 305 } | |
| OLD | NEW |