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

Unified Diff: runtime/vm/isolate_reload_test.cc

Issue 2011543002: Canonicalize uris in C++ instead of Dart for the standalone embedder. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixz release build Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload_test.cc
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index b6d138228589e1d72d085a6dfa8d5edad704eb53..9b4504673ac4722ba8b75b64a01f2160c1670ebc 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -648,7 +648,7 @@ TEST_CASE(IsolateReload_ComplexInheritanceChange) {
TEST_CASE(IsolateReload_LiveStack) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"helper() => 7;\n"
"alpha() { var x = helper(); reloadTest(); return x + helper(); }\n"
"foo() => alpha();\n"
@@ -661,7 +661,7 @@ TEST_CASE(IsolateReload_LiveStack) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"helper() => 100;\n"
"alpha() => 5 + helper();\n"
"foo() => alpha();\n"
@@ -694,41 +694,41 @@ TEST_CASE(IsolateReload_LibraryLookup) {
EXPECT_ERROR(SimpleInvokeError(lib, "main"), "importedFunc");
- // Fail to find 'importable_test_lib' in the isolate.
- result = Dart_LookupLibrary(NewString("importable_test_lib"));
+ // Fail to find 'test:importable_lib' in the isolate.
+ result = Dart_LookupLibrary(NewString("test:importable_lib"));
EXPECT(Dart_IsError(result));
const char* kReloadScript =
- "import 'importable_test_lib';\n"
+ "import 'test:importable_lib';\n"
"main() {\n"
" return importedFunc();\n"
"}\n";
- // Reload and add 'importable_test_lib' to isolate.
+ // Reload and add 'test:importable_lib' to isolate.
lib = TestCase::ReloadTestScript(kReloadScript);
EXPECT_VALID(lib);
EXPECT_STREQ("a", SimpleInvokeStr(lib, "main"));
- // Find 'importable_test_lib' in the isolate.
- result = Dart_LookupLibrary(NewString("importable_test_lib"));
+ // Find 'test:importable_lib' in the isolate.
+ result = Dart_LookupLibrary(NewString("test:importable_lib"));
EXPECT(Dart_IsLibrary(result));
// Reload and remove 'dart:math' from isolate.
lib = TestCase::ReloadTestScript(kScript);
EXPECT_VALID(lib);
- // Fail to find 'importable_test_lib' in the isolate.
- result = Dart_LookupLibrary(NewString("importable_test_lib"));
+ // Fail to find 'test:importable_lib' in the isolate.
+ result = Dart_LookupLibrary(NewString("test:importable_lib"));
EXPECT(Dart_IsError(result));
}
TEST_CASE(IsolateReload_LibraryHide) {
- // Import 'importable_test_lib' with importedFunc hidden. Will result in an
+ // Import 'test:importable_lib' with importedFunc hidden. Will result in an
// error.
const char* kScript =
- "import 'importable_test_lib' hide importedFunc;\n"
+ "import 'test:importable_lib' hide importedFunc;\n"
"main() {\n"
" return importedFunc();\n"
"}\n";
@@ -740,9 +740,9 @@ TEST_CASE(IsolateReload_LibraryHide) {
EXPECT_ERROR(SimpleInvokeError(lib, "main"), "importedFunc");
- // Import 'importable_test_lib'.
+ // Import 'test:importable_lib'.
const char* kReloadScript =
- "import 'importable_test_lib';\n"
+ "import 'test:importable_lib';\n"
"main() {\n"
" return importedFunc();\n"
"}\n";
@@ -755,10 +755,10 @@ TEST_CASE(IsolateReload_LibraryHide) {
TEST_CASE(IsolateReload_LibraryShow) {
- // Import 'importable_test_lib' with importedIntFunc visible. Will result in
+ // Import 'test:importable_lib' with importedIntFunc visible. Will result in
// an error when 'main' is invoked.
const char* kScript =
- "import 'importable_test_lib' show importedIntFunc;\n"
+ "import 'test:importable_lib' show importedIntFunc;\n"
"main() {\n"
" return importedFunc();\n"
"}\n"
@@ -775,10 +775,10 @@ TEST_CASE(IsolateReload_LibraryShow) {
// Results in an error.
EXPECT_ERROR(SimpleInvokeError(lib, "main"), "importedFunc");
- // Import 'importable_test_lib' with importedFunc visible. Will result in
+ // Import 'test:importable_lib' with importedFunc visible. Will result in
// an error when 'mainInt' is invoked.
const char* kReloadScript =
- "import 'importable_test_lib' show importedFunc;\n"
+ "import 'test:importable_lib' show importedFunc;\n"
"main() {\n"
" return importedFunc();\n"
"}\n"
@@ -800,8 +800,8 @@ TEST_CASE(IsolateReload_LibraryShow) {
// that is compatible with the fast path smi stubs.
TEST_CASE(IsolateReload_SmiFastPathStubs) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
- "import 'importable_test_lib' show importedIntFunc;\n"
+ "import 'test:isolate_reload_helper';\n"
+ "import 'test:importable_lib' show importedIntFunc;\n"
"main() {\n"
" var x = importedIntFunc();\n"
" var y = importedIntFunc();\n"
@@ -824,7 +824,7 @@ TEST_CASE(IsolateReload_SmiFastPathStubs) {
// mixins when we reload.
TEST_CASE(IsolateReload_ImportedMixinFunction) {
const char* kScript =
- "import 'importable_test_lib' show ImportedMixin;\n"
+ "import 'test:importable_lib' show ImportedMixin;\n"
"class A extends Object with ImportedMixin {\n"
"}"
"var func = new A().mixinFunc;\n"
@@ -838,7 +838,7 @@ TEST_CASE(IsolateReload_ImportedMixinFunction) {
EXPECT_STREQ("mixin", SimpleInvokeStr(lib, "main"));
const char* kReloadScript =
- "import 'importable_test_lib' show ImportedMixin;\n"
+ "import 'test:importable_lib' show ImportedMixin;\n"
"class A extends Object with ImportedMixin {\n"
"}"
"var func;\n"
@@ -877,7 +877,7 @@ TEST_CASE(IsolateReload_TopLevelParseError) {
TEST_CASE(IsolateReload_PendingUnqualifiedCall_StaticToInstance) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" static foo() => 'static';\n"
" test() {\n"
@@ -893,7 +893,7 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_StaticToInstance) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" foo() => 'instance';\n"
" test() {\n"
@@ -918,7 +918,7 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_StaticToInstance) {
TEST_CASE(IsolateReload_PendingUnqualifiedCall_InstanceToStatic) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" foo() => 'instance';\n"
" test() {\n"
@@ -934,7 +934,7 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_InstanceToStatic) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" static foo() => 'static';\n"
" test() {\n"
@@ -959,7 +959,7 @@ TEST_CASE(IsolateReload_PendingUnqualifiedCall_InstanceToStatic) {
TEST_CASE(IsolateReload_PendingConstructorCall_AbstractToConcrete) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"abstract class Foo {}\n"
"class C {\n"
" test() {\n"
@@ -980,7 +980,7 @@ TEST_CASE(IsolateReload_PendingConstructorCall_AbstractToConcrete) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class Foo {}\n"
"class C {\n"
" test() {\n"
@@ -1010,7 +1010,7 @@ TEST_CASE(IsolateReload_PendingConstructorCall_AbstractToConcrete) {
TEST_CASE(IsolateReload_PendingConstructorCall_ConcreteToAbstract) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class Foo {}\n"
"class C {\n"
" test() {\n"
@@ -1031,7 +1031,7 @@ TEST_CASE(IsolateReload_PendingConstructorCall_ConcreteToAbstract) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"abstract class Foo {}\n"
"class C {\n"
" test() {\n"
@@ -1061,7 +1061,7 @@ TEST_CASE(IsolateReload_PendingConstructorCall_ConcreteToAbstract) {
TEST_CASE(IsolateReload_PendingStaticCall_DefinedToNSM) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" static foo() => 'static'\n"
" test() {\n"
@@ -1081,7 +1081,7 @@ TEST_CASE(IsolateReload_PendingStaticCall_DefinedToNSM) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" test() {\n"
" reloadTest();\n"
@@ -1109,7 +1109,7 @@ TEST_CASE(IsolateReload_PendingStaticCall_DefinedToNSM) {
TEST_CASE(IsolateReload_PendingStaticCall_NSMToDefined) {
const char* kScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" test() {\n"
" reloadTest();\n"
@@ -1128,7 +1128,7 @@ TEST_CASE(IsolateReload_PendingStaticCall_NSMToDefined) {
EXPECT_VALID(lib);
const char* kReloadScript =
- "import 'isolate_reload_test_helper';\n"
+ "import 'test:isolate_reload_helper';\n"
"class C {\n"
" static foo() => 'static'\n"
" test() {\n"
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698