From 330ee1eb158693b939b90ecfeaed8c094d6d6489 Mon Sep 17 00:00:00 2001 From: "gram@google.com" Date: Fri, 9 Nov 2012 18:39:05 +0000 Subject: [PATCH] Updated tests/compiler/* to use new library syntax. Review URL: https://codereview.chromium.org//11368150 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14748 260f80e4-7a28-3924-810f-c04153c831b5 --- .../dart2js/array_static_intercept_test.dart | 2 +- .../dart2js/boolified_operator_test.dart | 4 +- tests/compiler/dart2js/boolify_test.dart | 4 +- .../compiler/dart2js/builtin_equals_test.dart | 2 +- .../dart2js/builtin_interceptor_test.dart | 2 +- .../compiler/dart2js/class_codegen2_test.dart | 4 +- .../compiler/dart2js/class_codegen_test.dart | 4 +- tests/compiler/dart2js/class_order_test.dart | 2 +- .../dart2js/closure_codegen_test.dart | 4 +- tests/compiler/dart2js/code_motion_test.dart | 2 +- .../dart2js/concrete_type_inference_test.dart | 6 +-- .../dart2js/constant_folding_test.dart | 2 +- tests/compiler/dart2js/dart_backend_test.dart | 40 +++++++++---------- .../dart2js/dead_phi_eliminator_test.dart | 2 +- .../compiler/dart2js/field_codegen_test.dart | 4 +- .../dart2js/generate_at_use_site_test.dart | 2 +- .../dart2js/gvn_dynamic_field_get_test.dart | 6 +-- tests/compiler/dart2js/gvn_test.dart | 2 +- tests/compiler/dart2js/identity_test.dart | 2 +- .../dart2js/inverse_operator_test.dart | 2 +- .../compiler/dart2js/is_inference2_test.dart | 2 +- tests/compiler/dart2js/is_inference_test.dart | 2 +- tests/compiler/dart2js/literal_list_test.dart | 2 +- tests/compiler/dart2js/loop_test.dart | 2 +- .../dart2js/minify_many_locals_test.dart | 2 +- .../dart2js/no_constructor_body_test.dart | 2 +- .../no_duplicate_constructor_body2_test.dart | 2 +- .../no_duplicate_constructor_body_test.dart | 2 +- .../dart2js/no_duplicate_stub_test.dart | 2 +- tests/compiler/dart2js/null_type_test.dart | 2 +- .../parameter_phi_elimination_test.dart | 2 +- .../dart2js/pretty_parameter_test.dart | 2 +- .../redundant_phi_eliminator_test.dart | 2 +- .../dart2js/rewrite_better_user_test.dart | 2 +- .../dart2js/ssa_phi_codegen_test.dart | 2 +- .../compiler/dart2js/static_closure_test.dart | 2 +- .../compiler/dart2js/string_escapes_test.dart | 2 +- .../dart2js/string_interpolation_test.dart | 2 +- tests/compiler/dart2js/tree_shaking_test.dart | 2 +- .../dart2js/type_guard_unuser_test.dart | 2 +- .../dart2js/type_inference2_test.dart | 2 +- .../dart2js/type_inference3_test.dart | 2 +- .../dart2js/type_inference4_test.dart | 2 +- .../dart2js/type_inference5_test.dart | 2 +- .../compiler/dart2js/type_inference_test.dart | 2 +- tests/compiler/dart2js/value_range_test.dart | 2 +- .../inline_position_crash_test.dart | 2 +- .../dart2js_extra/math_lib_prefix_test.dart | 4 +- .../compiler/dart2js_extra/math_lib_test.dart | 4 +- tests/compiler/dart2js_extra/panda_lib.dart | 2 +- tests/compiler/dart2js_extra/panda_test.dart | 4 +- .../dart2js_extra/regress/4434_lib.dart | 2 +- .../dart2js_extra/regress/4434_test.dart | 4 +- .../dart2js_extra/regress/4740_library.dart | 2 +- .../dart2js_extra/regress/4740_test.dart | 2 +- .../source_mapping_crash_test.dart | 4 +- .../native_library_same_name_used_lib1.dart | 4 +- .../native_library_same_name_used_lib2.dart | 4 +- .../native_library_same_name_used_test.dart | 4 +- ...tive_library_same_name_used_frog_test.dart | 4 +- .../native_library_same_name_used_lib1.dart | 4 +- .../native_library_same_name_used_lib2.dart | 4 +- 62 files changed, 102 insertions(+), 102 deletions(-) diff --git a/tests/compiler/dart2js/array_static_intercept_test.dart b/tests/compiler/dart2js/array_static_intercept_test.dart index 815d92d5da0..d75efeacd9d 100644 --- a/tests/compiler/dart2js/array_static_intercept_test.dart +++ b/tests/compiler/dart2js/array_static_intercept_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(a) { diff --git a/tests/compiler/dart2js/boolified_operator_test.dart b/tests/compiler/dart2js/boolified_operator_test.dart index 07ddbd2a852..d1807a12eab 100644 --- a/tests/compiler/dart2js/boolified_operator_test.dart +++ b/tests/compiler/dart2js/boolified_operator_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("boolified_operator_test.dart"); -#import("compiler_helper.dart"); +library boolified_operator_test; +import 'compiler_helper.dart'; const String TEST_EQUAL = r""" foo(param0, param1) { diff --git a/tests/compiler/dart2js/boolify_test.dart b/tests/compiler/dart2js/boolify_test.dart index 8e90efe4b73..a1db3bb8584 100644 --- a/tests/compiler/dart2js/boolify_test.dart +++ b/tests/compiler/dart2js/boolify_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("boolified_operator_test.dart"); -#import("compiler_helper.dart"); +library boolified_operator_test; +import 'compiler_helper.dart'; const String TEST = r""" foo() { diff --git a/tests/compiler/dart2js/builtin_equals_test.dart b/tests/compiler/dart2js/builtin_equals_test.dart index 0456f7ea26f..39bb56ac769 100644 --- a/tests/compiler/dart2js/builtin_equals_test.dart +++ b/tests/compiler/dart2js/builtin_equals_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST = r""" foo() { diff --git a/tests/compiler/dart2js/builtin_interceptor_test.dart b/tests/compiler/dart2js/builtin_interceptor_test.dart index ae62bf49391..f5a9b2fdc3e 100644 --- a/tests/compiler/dart2js/builtin_interceptor_test.dart +++ b/tests/compiler/dart2js/builtin_interceptor_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(String a) { diff --git a/tests/compiler/dart2js/class_codegen2_test.dart b/tests/compiler/dart2js/class_codegen2_test.dart index 90a18208ae3..91b6b97f731 100644 --- a/tests/compiler/dart2js/class_codegen2_test.dart +++ b/tests/compiler/dart2js/class_codegen2_test.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); -#import("parser_helper.dart"); +import 'compiler_helper.dart'; +import 'parser_helper.dart'; const String TEST_ONE = r""" class A { foo() => 499; } diff --git a/tests/compiler/dart2js/class_codegen_test.dart b/tests/compiler/dart2js/class_codegen_test.dart index 6d751f07cd6..6f751c732b2 100644 --- a/tests/compiler/dart2js/class_codegen_test.dart +++ b/tests/compiler/dart2js/class_codegen_test.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); -#import("parser_helper.dart"); +import 'compiler_helper.dart'; +import 'parser_helper.dart'; const String TEST_ONE = r""" class A { } diff --git a/tests/compiler/dart2js/class_order_test.dart b/tests/compiler/dart2js/class_order_test.dart index 2c7aae7e155..b873fe3481f 100644 --- a/tests/compiler/dart2js/class_order_test.dart +++ b/tests/compiler/dart2js/class_order_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" class A { foo() => 499; } diff --git a/tests/compiler/dart2js/closure_codegen_test.dart b/tests/compiler/dart2js/closure_codegen_test.dart index fc072101352..7b4989948a0 100644 --- a/tests/compiler/dart2js/closure_codegen_test.dart +++ b/tests/compiler/dart2js/closure_codegen_test.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); -#import("parser_helper.dart"); +import 'compiler_helper.dart'; +import 'parser_helper.dart'; const String TEST_INVOCATION0 = r""" main() { diff --git a/tests/compiler/dart2js/code_motion_test.dart b/tests/compiler/dart2js/code_motion_test.dart index 568da95a720..89005443e9f 100644 --- a/tests/compiler/dart2js/code_motion_test.dart +++ b/tests/compiler/dart2js/code_motion_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(int a, int b, bool param2) { diff --git a/tests/compiler/dart2js/concrete_type_inference_test.dart b/tests/compiler/dart2js/concrete_type_inference_test.dart index 9c303165ea3..90c479e258e 100644 --- a/tests/compiler/dart2js/concrete_type_inference_test.dart +++ b/tests/compiler/dart2js/concrete_type_inference_test.dart @@ -2,10 +2,10 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("dart:uri"); +import 'dart:uri'; -#import('compiler_helper.dart'); -#import('parser_helper.dart'); +import 'compiler_helper.dart'; +import 'parser_helper.dart'; void compileAndFind(String code, String name, check(compiler, element)) { diff --git a/tests/compiler/dart2js/constant_folding_test.dart b/tests/compiler/dart2js/constant_folding_test.dart index 24b7630376f..e2133b7f70e 100644 --- a/tests/compiler/dart2js/constant_folding_test.dart +++ b/tests/compiler/dart2js/constant_folding_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Test constant folding on numbers. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String NUMBER_FOLDING = """ void main() { diff --git a/tests/compiler/dart2js/dart_backend_test.dart b/tests/compiler/dart2js/dart_backend_test.dart index ce5702bc0d5..cc246cf04b9 100644 --- a/tests/compiler/dart2js/dart_backend_test.dart +++ b/tests/compiler/dart2js/dart_backend_test.dart @@ -12,7 +12,7 @@ import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; const coreLib = r''' -#library('corelib'); +library corelib; class Object {} interface bool {} interface num {} @@ -34,14 +34,14 @@ print(x) {} '''; const ioLib = r''' -#library('io'); +library io; class Platform { static int operatingSystem; } '''; const htmlLib = r''' -#library('html'); +library html; Window __window; Window get window => __window; abstract class Window { @@ -53,7 +53,7 @@ abstract class Navigator { '''; const helperLib = r''' -#library('js_helper'); +library js_helper; class JSInvocationMirror {} '''; @@ -183,7 +183,7 @@ testConflictSendsRename() { // everything is renamed correctly in conflicting class names and global // functions. var librarySrc = ''' -#library("mylib.dart"); +library mylib; globalfoo() {} var globalVar; @@ -198,7 +198,7 @@ class A { } '''; var mainSrc = ''' -#import("mylib.dart", prefix: "mylib"); +import 'mylib.dart' as mylib; globalfoo() {} var globalVar; @@ -258,7 +258,7 @@ testNoConflictSendsRename() { // Various Send-s to current library and external library. Nothing should be // renamed here, only library prefixes must be cut. var librarySrc = ''' -#library("mylib.dart"); +library mylib; globalfoo() {} @@ -271,7 +271,7 @@ class A { } '''; var mainSrc = ''' -#import("mylib.dart", prefix: "mylib"); +import 'mylib.dart' as mylib; myglobalfoo() {} @@ -315,7 +315,7 @@ main() { testConflictLibraryClassRename() { var librarySrc = ''' -#library('mylib'); +library mylib; topfoo() {} @@ -324,7 +324,7 @@ class A { } '''; var mainSrc = ''' -#import('mylib.dart', prefix: 'mylib'); +import 'mylib.dart' as mylib; topfoo() {var x = 5;} @@ -380,13 +380,13 @@ testStaticInvocation() { testLibraryGetSet() { var librarySrc = ''' -#library('mylib'); +library mylib; get topgetset => 5; set topgetset(arg) {} '''; var mainSrc = ''' -#import('mylib.dart', prefix: 'mylib'); +import 'mylib.dart' as mylib; get topgetset => 6; set topgetset(arg) {} @@ -478,14 +478,14 @@ testTypeVariablesAreRenamed() { // if we have a class and type variable with the same name, they // both should be renamed. var librarySrc = ''' -#library('mylib'); +library mylib; typedef void MyFunction(T arg); class T {} class B {} class A extends B { T f; } '''; var mainSrc = ''' -#import('mylib.dart', prefix: 'mylib'); +import 'mylib.dart' as mylib; typedef void MyFunction(T arg); class T {} class B {} @@ -518,14 +518,14 @@ main() { testClassTypeArgumentBound() { var librarySrc = ''' -#library('mylib'); +library mylib; interface I {} class A {} '''; var mainSrc = ''' -#import('mylib.dart', prefix: 'mylib'); +import 'mylib.dart' as mylib; interface I {} class A {} @@ -547,11 +547,11 @@ main() { testDoubleMains() { var librarySrc = ''' -#library('mylib'); +library mylib; main() {} '''; var mainSrc = ''' -#import('mylib.dart', prefix: 'mylib'); +import 'mylib.dart' as mylib; main() { mylib.main(); } @@ -565,7 +565,7 @@ main() { testStaticAccessIoLib() { var src = ''' -#import('dart:io'); +import 'dart:io'; main() { Platform.operatingSystem; @@ -658,7 +658,7 @@ main() { testPlatformLibraryMemberNamesAreFixed() { var src = ''' -#import('dart:html'); +import 'dart:html'; class A { static String get userAgent => window.navigator.userAgent; diff --git a/tests/compiler/dart2js/dead_phi_eliminator_test.dart b/tests/compiler/dart2js/dead_phi_eliminator_test.dart index 5e2114afa11..82ed1c651a8 100644 --- a/tests/compiler/dart2js/dead_phi_eliminator_test.dart +++ b/tests/compiler/dart2js/dead_phi_eliminator_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" void foo(bar) { diff --git a/tests/compiler/dart2js/field_codegen_test.dart b/tests/compiler/dart2js/field_codegen_test.dart index 80ca722feb2..948b4cd201f 100644 --- a/tests/compiler/dart2js/field_codegen_test.dart +++ b/tests/compiler/dart2js/field_codegen_test.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); -#import("parser_helper.dart"); +import 'compiler_helper.dart'; +import 'parser_helper.dart'; const String TEST_NULL0 = r""" class A { static var x; } diff --git a/tests/compiler/dart2js/generate_at_use_site_test.dart b/tests/compiler/dart2js/generate_at_use_site_test.dart index bee64456af8..d0955cb99dd 100644 --- a/tests/compiler/dart2js/generate_at_use_site_test.dart +++ b/tests/compiler/dart2js/generate_at_use_site_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String FIB = r""" fib(n) { diff --git a/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart b/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart index f6fd7f5e48a..380f131fe12 100644 --- a/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart +++ b/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart @@ -4,9 +4,9 @@ // Test that dart2js gvns dynamic getters that don't have side // effects. -#import('compiler_helper.dart'); -#import('parser_helper.dart'); -#import('dart:uri'); +import 'compiler_helper.dart'; +import 'parser_helper.dart'; +import 'dart:uri'; const String TEST = r""" class A { diff --git a/tests/compiler/dart2js/gvn_test.dart b/tests/compiler/dart2js/gvn_test.dart index ec06ea68a83..8414ca8a0cc 100644 --- a/tests/compiler/dart2js/gvn_test.dart +++ b/tests/compiler/dart2js/gvn_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" void foo(bar) { diff --git a/tests/compiler/dart2js/identity_test.dart b/tests/compiler/dart2js/identity_test.dart index 348c1bf71c6..327827a7218 100644 --- a/tests/compiler/dart2js/identity_test.dart +++ b/tests/compiler/dart2js/identity_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" class A {} diff --git a/tests/compiler/dart2js/inverse_operator_test.dart b/tests/compiler/dart2js/inverse_operator_test.dart index 2b4824271fb..6bf6ca6a65b 100644 --- a/tests/compiler/dart2js/inverse_operator_test.dart +++ b/tests/compiler/dart2js/inverse_operator_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String MAIN = r""" int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); diff --git a/tests/compiler/dart2js/is_inference2_test.dart b/tests/compiler/dart2js/is_inference2_test.dart index 00016a9bc24..36e39ba27a6 100644 --- a/tests/compiler/dart2js/is_inference2_test.dart +++ b/tests/compiler/dart2js/is_inference2_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_IF_BOOL_FIRST_INSTRUCTION = r""" negate(x) { diff --git a/tests/compiler/dart2js/is_inference_test.dart b/tests/compiler/dart2js/is_inference_test.dart index 7ac6f023dda..e282a8619ae 100644 --- a/tests/compiler/dart2js/is_inference_test.dart +++ b/tests/compiler/dart2js/is_inference_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_IF = r""" test(param) { diff --git a/tests/compiler/dart2js/literal_list_test.dart b/tests/compiler/dart2js/literal_list_test.dart index 08b72d04d79..105790e3276 100644 --- a/tests/compiler/dart2js/literal_list_test.dart +++ b/tests/compiler/dart2js/literal_list_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo() { diff --git a/tests/compiler/dart2js/loop_test.dart b/tests/compiler/dart2js/loop_test.dart index ed5db3ab0a7..ee499754edc 100644 --- a/tests/compiler/dart2js/loop_test.dart +++ b/tests/compiler/dart2js/loop_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(a) { diff --git a/tests/compiler/dart2js/minify_many_locals_test.dart b/tests/compiler/dart2js/minify_many_locals_test.dart index e25b249bca1..5628017a4b0 100644 --- a/tests/compiler/dart2js/minify_many_locals_test.dart +++ b/tests/compiler/dart2js/minify_many_locals_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; main() { var buffer = new StringBuffer(); diff --git a/tests/compiler/dart2js/no_constructor_body_test.dart b/tests/compiler/dart2js/no_constructor_body_test.dart index 3588e0daa91..ea1a6b2deec 100644 --- a/tests/compiler/dart2js/no_constructor_body_test.dart +++ b/tests/compiler/dart2js/no_constructor_body_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST = r""" class A { diff --git a/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart b/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart index 598c28a8fbc..b5e2674562c 100644 --- a/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart +++ b/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String CODE = """ var x = 0; diff --git a/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart b/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart index 23464d6f601..8e4eae68f35 100644 --- a/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart +++ b/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String CODE = """ class A { diff --git a/tests/compiler/dart2js/no_duplicate_stub_test.dart b/tests/compiler/dart2js/no_duplicate_stub_test.dart index 577747011cd..fa0fe59fd66 100644 --- a/tests/compiler/dart2js/no_duplicate_stub_test.dart +++ b/tests/compiler/dart2js/no_duplicate_stub_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST = r""" class A { diff --git a/tests/compiler/dart2js/null_type_test.dart b/tests/compiler/dart2js/null_type_test.dart index ba9f59647a9..0abc65f3cbd 100644 --- a/tests/compiler/dart2js/null_type_test.dart +++ b/tests/compiler/dart2js/null_type_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo() { diff --git a/tests/compiler/dart2js/parameter_phi_elimination_test.dart b/tests/compiler/dart2js/parameter_phi_elimination_test.dart index 2fbb34b880e..6268037a965 100644 --- a/tests/compiler/dart2js/parameter_phi_elimination_test.dart +++ b/tests/compiler/dart2js/parameter_phi_elimination_test.dart @@ -6,7 +6,7 @@ // VMOptions=--enable_asserts -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String SOURCE = r""" bool baz(int a, int b) { diff --git a/tests/compiler/dart2js/pretty_parameter_test.dart b/tests/compiler/dart2js/pretty_parameter_test.dart index ed4caeeafe8..33c730f3b77 100644 --- a/tests/compiler/dart2js/pretty_parameter_test.dart +++ b/tests/compiler/dart2js/pretty_parameter_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String FOO = r""" void foo(var a, var b) { diff --git a/tests/compiler/dart2js/redundant_phi_eliminator_test.dart b/tests/compiler/dart2js/redundant_phi_eliminator_test.dart index 0dac7ba5349..47bdd46b5fc 100644 --- a/tests/compiler/dart2js/redundant_phi_eliminator_test.dart +++ b/tests/compiler/dart2js/redundant_phi_eliminator_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" void foo(bar) { diff --git a/tests/compiler/dart2js/rewrite_better_user_test.dart b/tests/compiler/dart2js/rewrite_better_user_test.dart index e310472a445..a5419f300e4 100644 --- a/tests/compiler/dart2js/rewrite_better_user_test.dart +++ b/tests/compiler/dart2js/rewrite_better_user_test.dart @@ -4,7 +4,7 @@ // Test that we get rid of duplicate type guards on a field when that // field is being gvn'ed. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST = r""" class A { diff --git a/tests/compiler/dart2js/ssa_phi_codegen_test.dart b/tests/compiler/dart2js/ssa_phi_codegen_test.dart index 7f026507e00..7cfdcc25752 100644 --- a/tests/compiler/dart2js/ssa_phi_codegen_test.dart +++ b/tests/compiler/dart2js/ssa_phi_codegen_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Test that parameters keep their names in the output. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" void foo(bar) { diff --git a/tests/compiler/dart2js/static_closure_test.dart b/tests/compiler/dart2js/static_closure_test.dart index 42bd12eb1e9..75a412ec693 100644 --- a/tests/compiler/dart2js/static_closure_test.dart +++ b/tests/compiler/dart2js/static_closure_test.dart @@ -4,7 +4,7 @@ // Test that static functions are closurized as expected. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; main() { String code = compileAll(r'''main() { print(main); }'''); diff --git a/tests/compiler/dart2js/string_escapes_test.dart b/tests/compiler/dart2js/string_escapes_test.dart index 5b61034f595..d62dbf684ca 100644 --- a/tests/compiler/dart2js/string_escapes_test.dart +++ b/tests/compiler/dart2js/string_escapes_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; // Test that the compiler handles string literals containing line terminators. diff --git a/tests/compiler/dart2js/string_interpolation_test.dart b/tests/compiler/dart2js/string_interpolation_test.dart index 8dcd391fae4..1fa3a33930e 100644 --- a/tests/compiler/dart2js/string_interpolation_test.dart +++ b/tests/compiler/dart2js/string_interpolation_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; main() { String code = diff --git a/tests/compiler/dart2js/tree_shaking_test.dart b/tests/compiler/dart2js/tree_shaking_test.dart index c917066fe78..15172581999 100644 --- a/tests/compiler/dart2js/tree_shaking_test.dart +++ b/tests/compiler/dart2js/tree_shaking_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import('compiler_helper.dart'); +import 'compiler_helper.dart'; const String TEST = r""" class A { diff --git a/tests/compiler/dart2js/type_guard_unuser_test.dart b/tests/compiler/dart2js/type_guard_unuser_test.dart index 5a6ee89a03f..6788160e1a6 100644 --- a/tests/compiler/dart2js/type_guard_unuser_test.dart +++ b/tests/compiler/dart2js/type_guard_unuser_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(a) { diff --git a/tests/compiler/dart2js/type_inference2_test.dart b/tests/compiler/dart2js/type_inference2_test.dart index 7d876454d44..a1613ac73e9 100644 --- a/tests/compiler/dart2js/type_inference2_test.dart +++ b/tests/compiler/dart2js/type_inference2_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" sum(param0, param1) { diff --git a/tests/compiler/dart2js/type_inference3_test.dart b/tests/compiler/dart2js/type_inference3_test.dart index 75047619561..0cec9cdb2d9 100644 --- a/tests/compiler/dart2js/type_inference3_test.dart +++ b/tests/compiler/dart2js/type_inference3_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" sum(param0, param1) { diff --git a/tests/compiler/dart2js/type_inference4_test.dart b/tests/compiler/dart2js/type_inference4_test.dart index 52ac6b44688..2ef44045aad 100644 --- a/tests/compiler/dart2js/type_inference4_test.dart +++ b/tests/compiler/dart2js/type_inference4_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(j) { diff --git a/tests/compiler/dart2js/type_inference5_test.dart b/tests/compiler/dart2js/type_inference5_test.dart index 2382de7009b..2a88b59c196 100644 --- a/tests/compiler/dart2js/type_inference5_test.dart +++ b/tests/compiler/dart2js/type_inference5_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" foo(j) { diff --git a/tests/compiler/dart2js/type_inference_test.dart b/tests/compiler/dart2js/type_inference_test.dart index 69580299fe0..0b4de27cd88 100644 --- a/tests/compiler/dart2js/type_inference_test.dart +++ b/tests/compiler/dart2js/type_inference_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const String TEST_ONE = r""" sum(a, b) { diff --git a/tests/compiler/dart2js/value_range_test.dart b/tests/compiler/dart2js/value_range_test.dart index 56b012a38e0..50d40d935f9 100644 --- a/tests/compiler/dart2js/value_range_test.dart +++ b/tests/compiler/dart2js/value_range_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import("compiler_helper.dart"); +import 'compiler_helper.dart'; const int REMOVED = 0; const int ABOVE_ZERO = 1; diff --git a/tests/compiler/dart2js_extra/inline_position_crash_test.dart b/tests/compiler/dart2js_extra/inline_position_crash_test.dart index d3881aa2017..07039ddd554 100644 --- a/tests/compiler/dart2js_extra/inline_position_crash_test.dart +++ b/tests/compiler/dart2js_extra/inline_position_crash_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#source('inline_position_crash_source.dart'); +part 'inline_position_crash_source.dart'; class Sub extends Super { Sub() : super(); diff --git a/tests/compiler/dart2js_extra/math_lib_prefix_test.dart b/tests/compiler/dart2js_extra/math_lib_prefix_test.dart index 2e18f5e7c4b..7d8720ba562 100644 --- a/tests/compiler/dart2js_extra/math_lib_prefix_test.dart +++ b/tests/compiler/dart2js_extra/math_lib_prefix_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("math_lib_prefix_test"); -#import("dart:math", prefix: "foo"); +library math_lib_prefix_test; +import 'dart:math' as foo; main() { Expect.equals(2.0, foo.sqrt(4)); diff --git a/tests/compiler/dart2js_extra/math_lib_test.dart b/tests/compiler/dart2js_extra/math_lib_test.dart index 78876886ff3..aec45b82fe5 100644 --- a/tests/compiler/dart2js_extra/math_lib_test.dart +++ b/tests/compiler/dart2js_extra/math_lib_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("math_lib_test"); -#import("dart:math"); +library math_lib_test; +import 'dart:math'; main() { Expect.equals(2.0, sqrt(4)); diff --git a/tests/compiler/dart2js_extra/panda_lib.dart b/tests/compiler/dart2js_extra/panda_lib.dart index 24bdd8843fe..e56a8ac9b96 100644 --- a/tests/compiler/dart2js_extra/panda_lib.dart +++ b/tests/compiler/dart2js_extra/panda_lib.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("panda_lib"); +library panda_lib; class Panda { Panda() { diff --git a/tests/compiler/dart2js_extra/panda_test.dart b/tests/compiler/dart2js_extra/panda_test.dart index 394c337137b..3b3995390b8 100644 --- a/tests/compiler/dart2js_extra/panda_test.dart +++ b/tests/compiler/dart2js_extra/panda_test.dart @@ -2,8 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("panda_test"); -#import("panda_lib.dart", prefix:"p"); +library panda_test; +import 'panda_lib.dart' as p; void main() { p.Panda x = new p.Panda(); diff --git a/tests/compiler/dart2js_extra/regress/4434_lib.dart b/tests/compiler/dart2js_extra/regress/4434_lib.dart index 763913270c5..a2ac7c459df 100644 --- a/tests/compiler/dart2js_extra/regress/4434_lib.dart +++ b/tests/compiler/dart2js_extra/regress/4434_lib.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("lib_a"); +library lib_a; class A { x(A a) => a._x; diff --git a/tests/compiler/dart2js_extra/regress/4434_test.dart b/tests/compiler/dart2js_extra/regress/4434_test.dart index 0fe32948358..0f23991ee3f 100644 --- a/tests/compiler/dart2js_extra/regress/4434_test.dart +++ b/tests/compiler/dart2js_extra/regress/4434_test.dart @@ -2,9 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library("lib_b"); +library lib_b; -#import("4434_lib.dart"); +import '4434_lib.dart'; class B extends A { } diff --git a/tests/compiler/dart2js_extra/regress/4740_library.dart b/tests/compiler/dart2js_extra/regress/4740_library.dart index fd51e977bfe..bb3fc8e0b82 100644 --- a/tests/compiler/dart2js_extra/regress/4740_library.dart +++ b/tests/compiler/dart2js_extra/regress/4740_library.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library('4740_library'); +library 4740_library; class Foo { Foo._internal(); diff --git a/tests/compiler/dart2js_extra/regress/4740_test.dart b/tests/compiler/dart2js_extra/regress/4740_test.dart index e2df2c35ca0..f04c71153a7 100644 --- a/tests/compiler/dart2js_extra/regress/4740_test.dart +++ b/tests/compiler/dart2js_extra/regress/4740_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#import('4740_library.dart'); +import '4740_library.dart'; main() { Expect.throws(() => new Foo._internal(), (e) => e is NoSuchMethodError); diff --git a/tests/compiler/dart2js_extra/source_mapping_crash_test.dart b/tests/compiler/dart2js_extra/source_mapping_crash_test.dart index 63b038ec303..98c6ec97283 100644 --- a/tests/compiler/dart2js_extra/source_mapping_crash_test.dart +++ b/tests/compiler/dart2js_extra/source_mapping_crash_test.dart @@ -2,9 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -#library('source_mapping_crash_test'); +library source_mapping_crash_test; -#source('source_mapping_crash_source.dart'); +part 'source_mapping_crash_source.dart'; class Sub extends Super { Sub(var x) : super(x.y); diff --git a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart index 233521d3402..fbe7446a3be 100644 --- a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart +++ b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart @@ -4,9 +4,9 @@ // 'I' is the name of an interface and the name of the native class. -#library('native_library_same_name_used_lib1.dart'); +library native_library_same_name_used_lib1; -#import('native_library_same_name_used_lib2.dart'); +import 'native_library_same_name_used_lib2.dart'; interface I { I read(); diff --git a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart index 7eaf6aa92a3..2fbb0098d00 100644 --- a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart +++ b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart @@ -4,8 +4,8 @@ // Native implementation. -#library('lib2'); -#import('native_library_same_name_used_lib1.dart'); // To get interface I. +library lib2; +import 'native_library_same_name_used_lib1.dart'; // To get interface I. // Native impl has same name as interface. @native("*I") diff --git a/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart b/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart index e3efa23cadb..f9e2bbb50f9 100644 --- a/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart +++ b/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart @@ -4,8 +4,8 @@ // Test for correct hidden native class when interface has same name. -#library('main'); -#import('native_library_same_name_used_lib1.dart'); +library main; +import 'native_library_same_name_used_lib1.dart'; @native(""" // This code is all inside 'setup' and so not accesible from the global scope. diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart b/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart index 3cd6c86524d..1480dfebe20 100644 --- a/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart +++ b/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart @@ -4,8 +4,8 @@ // Test for correct hidden native class when interface has same name. -#library('main'); -#import('native_library_same_name_used_lib1.dart'); +library main; +import 'native_library_same_name_used_lib1.dart'; void setup() native """ // This code is all inside 'setup' and so not accesible from the global scope. diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart b/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart index 4e576c33478..3080d4cee09 100644 --- a/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart +++ b/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart @@ -4,9 +4,9 @@ // 'I' is the name of an interface and the name of the native class. -#library('native_library_same_name_used_lib1.dart'); +library native_library_same_name_used_lib1; -#import('native_library_same_name_used_lib2.dart'); +import 'native_library_same_name_used_lib2.dart'; interface I { I read(); diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart b/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart index cef03fb9c04..9f1cfe6b065 100644 --- a/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart +++ b/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart @@ -4,8 +4,8 @@ // Native implementation. -#library('lib2'); -#import('native_library_same_name_used_lib1.dart'); // To get interface I. +library lib2; +import 'native_library_same_name_used_lib1.dart'; // To get interface I. // Native impl has same name as interface. class Impl implements I native "*I" {