| Index: runtime/vm/snapshot_test.cc
|
| diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
|
| index cbe7009aaf015cf7bff16b3f4b5b9f3c67ca8d92..81c43420b34ac547827610b350e5cffa14be0cb2 100644
|
| --- a/runtime/vm/snapshot_test.cc
|
| +++ b/runtime/vm/snapshot_test.cc
|
| @@ -1635,8 +1635,7 @@ UNIT_TEST_CASE(ScriptSnapshot2) {
|
|
|
|
|
| UNIT_TEST_CASE(MismatchedSnapshotKinds) {
|
| - const char* kScriptChars =
|
| - "main() { print('Hello, world!'); }";
|
| + const char* kScriptChars = "main() { print('Hello, world!'); }";
|
| Dart_Handle result;
|
|
|
| uint8_t* buffer;
|
| @@ -1657,10 +1656,8 @@ UNIT_TEST_CASE(MismatchedSnapshotKinds) {
|
| Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
|
|
|
| // Write out the script snapshot.
|
| - result = Dart_CreateSnapshot(NULL,
|
| - &vm_isolate_snapshot_size,
|
| - &isolate_snapshot,
|
| - &isolate_snapshot_size);
|
| + result = Dart_CreateSnapshot(NULL, &vm_isolate_snapshot_size,
|
| + &isolate_snapshot, &isolate_snapshot_size);
|
| EXPECT_VALID(result);
|
| full_snapshot = reinterpret_cast<uint8_t*>(malloc(isolate_snapshot_size));
|
| memmove(full_snapshot, isolate_snapshot, isolate_snapshot_size);
|
| @@ -1692,9 +1689,8 @@ UNIT_TEST_CASE(MismatchedSnapshotKinds) {
|
| {
|
| // Use a script snapshot where a full snapshot is expected.
|
| char* error = NULL;
|
| - Dart_Isolate isolate = Dart_CreateIsolate("script-uri", "main",
|
| - script_snapshot, NULL, NULL,
|
| - &error);
|
| + Dart_Isolate isolate = Dart_CreateIsolate(
|
| + "script-uri", "main", script_snapshot, NULL, NULL, &error);
|
| EXPECT(isolate == NULL);
|
| EXPECT(error != NULL);
|
| EXPECT_SUBSTRING("got 'script', expected 'core'", error);
|
| @@ -1706,8 +1702,9 @@ UNIT_TEST_CASE(MismatchedSnapshotKinds) {
|
|
|
| // Use a full snapshot where a script snapshot is expected.
|
| Dart_Handle result = Dart_LoadScriptFromSnapshot(full_snapshot, size);
|
| - EXPECT_ERROR(result, "Dart_LoadScriptFromSnapshot expects parameter"
|
| - " 'buffer' to be a script type snapshot.");
|
| + EXPECT_ERROR(result,
|
| + "Dart_LoadScriptFromSnapshot expects parameter"
|
| + " 'buffer' to be a script type snapshot.");
|
|
|
| Dart_ExitScope();
|
| }
|
|
|