Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/unit_test.h" | 5 #include "vm/unit_test.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
| 10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 void TestCaseBase::RunAll() { | 45 void TestCaseBase::RunAll() { |
| 46 TestCaseBase* test = first_; | 46 TestCaseBase* test = first_; |
| 47 while (test != NULL) { | 47 while (test != NULL) { |
| 48 test->RunTest(); | 48 test->RunTest(); |
| 49 test = test->next_; | 49 test = test->next_; |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 | 53 |
| 54 Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) { | 54 Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) { |
| 55 bin::IsolateData* isolate_data = new bin::IsolateData(name, NULL, NULL); | 55 bin::IsolateData* isolate_data = NULL; |
| 56 char* err; | 56 char* err; |
| 57 Dart_Isolate isolate = | 57 Dart_Isolate isolate = |
| 58 Dart_CreateIsolate(name, NULL, buffer, NULL, isolate_data, &err); | 58 Dart_CreateIsolate(name, NULL, buffer, NULL, isolate_data, &err); |
|
zra
2017/01/11 19:05:21
ditto
rmacnak
2017/01/11 19:11:08
Done.
| |
| 59 if (isolate == NULL) { | 59 if (isolate == NULL) { |
| 60 OS::Print("Creation of isolate failed '%s'\n", err); | 60 OS::Print("Creation of isolate failed '%s'\n", err); |
| 61 free(err); | 61 free(err); |
| 62 } | 62 } |
| 63 EXPECT(isolate != NULL); | 63 EXPECT(isolate != NULL); |
| 64 return isolate; | 64 return isolate; |
| 65 } | 65 } |
| 66 | 66 |
| 67 | 67 |
| 68 static const char* kPackageScheme = "package:"; | 68 static const char* kPackageScheme = "package:"; |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 480 } | 480 } |
| 481 // Copy the remainder of in to out. | 481 // Copy the remainder of in to out. |
| 482 while (*in != '\0') { | 482 while (*in != '\0') { |
| 483 *out++ = *in++; | 483 *out++ = *in++; |
| 484 } | 484 } |
| 485 *out = '\0'; | 485 *out = '\0'; |
| 486 } | 486 } |
| 487 | 487 |
| 488 | 488 |
| 489 } // namespace dart | 489 } // namespace dart |
| OLD | NEW |