Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: runtime/vm/isolate_reload_test.cc

Issue 3001013002: Pass path to platform kernel binary to kernel-service. (Closed)
Patch Set: Add TODO to switch to outline.dill Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_tools_api.h" 6 #include "include/dart_tools_api.h"
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 "file:///test-lib.dart", 181 "file:///test-lib.dart",
182 "WhatsTheMeaningOfAllThis() {\n" 182 "WhatsTheMeaningOfAllThis() {\n"
183 " return 24;\n" 183 " return 24;\n"
184 "}\n" 184 "}\n"
185 "" 185 ""
186 }}; 186 }};
187 // clang-format on 187 // clang-format on
188 { 188 {
189 void* kernel_pgm = NULL; 189 void* kernel_pgm = NULL;
190 char* error = TestCase::CompileTestScriptWithDFE( 190 char* error = TestCase::CompileTestScriptWithDFE(
191 "file:///test-app", 191 "file:///test-app.dart",
siva 2017/08/17 15:40:57 why is the '.dart' suffix needed ?
aam 2017/08/17 16:29:58 Reverted. At some point I was fighting with some w
192 sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile), 192 sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
193 updated_sourcefiles, &kernel_pgm, true /* incrementally */); 193 updated_sourcefiles, &kernel_pgm, true /* incrementally */);
194 EXPECT(error == NULL); 194 EXPECT(error == NULL);
195 EXPECT_NOTNULL(kernel_pgm); 195 EXPECT_NOTNULL(kernel_pgm);
196 196
197 lib = TestCase::ReloadTestKernel(kernel_pgm); 197 lib = TestCase::ReloadTestKernel(kernel_pgm);
198 EXPECT_VALID(lib); 198 EXPECT_VALID(lib);
199 } 199 }
200 result = Dart_Invoke(lib, NewString("main"), 0, NULL); 200 result = Dart_Invoke(lib, NewString("main"), 0, NULL);
201 result = Dart_IntegerToInt64(result, &value); 201 result = Dart_IntegerToInt64(result, &value);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 "}\n" 256 "}\n"
257 "main() {\n" 257 "main() {\n"
258 " return (new MyAccountState(new Account()))\n" 258 " return (new MyAccountState(new Account()))\n"
259 " .howAreTheThings().balance();\n" 259 " .howAreTheThings().balance();\n"
260 "}\n", 260 "}\n",
261 }}; 261 }};
262 // clang-format on 262 // clang-format on
263 { 263 {
264 void* kernel_pgm = NULL; 264 void* kernel_pgm = NULL;
265 char* error = TestCase::CompileTestScriptWithDFE( 265 char* error = TestCase::CompileTestScriptWithDFE(
266 "file:///test-app", 266 "file:///test-app.dart",
267 sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile), 267 sizeof(updated_sourcefiles) / sizeof(Dart_SourceFile),
268 updated_sourcefiles, &kernel_pgm, true /* incrementally */); 268 updated_sourcefiles, &kernel_pgm, true /* incrementally */);
269 EXPECT(error == NULL); 269 EXPECT(error == NULL);
270 EXPECT_NOTNULL(kernel_pgm); 270 EXPECT_NOTNULL(kernel_pgm);
271 271
272 lib = TestCase::ReloadTestKernel(kernel_pgm); 272 lib = TestCase::ReloadTestKernel(kernel_pgm);
273 EXPECT_VALID(lib); 273 EXPECT_VALID(lib);
274 } 274 }
275 result = Dart_Invoke(lib, NewString("main"), 0, NULL); 275 result = Dart_Invoke(lib, NewString("main"), 0, NULL);
276 result = Dart_IntegerToInt64(result, &value); 276 result = Dart_IntegerToInt64(result, &value);
(...skipping 3332 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 "}\n"; 3609 "}\n";
3610 3610
3611 Dart_Handle result = TestCase::ReloadTestScript(kReloadScript); 3611 Dart_Handle result = TestCase::ReloadTestScript(kReloadScript);
3612 EXPECT_VALID(result); 3612 EXPECT_VALID(result);
3613 EXPECT_STREQ("false", SimpleInvokeStr(lib, "main")); 3613 EXPECT_STREQ("false", SimpleInvokeStr(lib, "main"));
3614 } 3614 }
3615 3615
3616 #endif // !PRODUCT 3616 #endif // !PRODUCT
3617 3617
3618 } // namespace dart 3618 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698