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

Unified Diff: tests/compiler/dart2js_native/core_type_check_native_test.dart

Issue 2984403002: dart2js_native tests: Migrate 'native STRING' to JS-calls (Closed)
Patch Set: the rest of the files Created 3 years, 5 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
Index: tests/compiler/dart2js_native/core_type_check_native_test.dart
diff --git a/tests/compiler/dart2js_native/core_type_check_native_test.dart b/tests/compiler/dart2js_native/core_type_check_native_test.dart
index dc8019fe2a2c4db4ac3f722e991ff2ab79ba2ab3..c1411b610a12f16dfb7aa5c9f914db8760ab0f4a 100644
--- a/tests/compiler/dart2js_native/core_type_check_native_test.dart
+++ b/tests/compiler/dart2js_native/core_type_check_native_test.dart
@@ -21,21 +21,25 @@ makeB() native;
makeC() native;
makeD() native;
-void setup() native """
-function A() {};
-makeA = function() { return new A; }
-function B() {};
-makeB = function() { return new B; }
-function C() {};
-makeC = function() { return new C; }
-function D() {};
-makeD = function() { return new D; }
+void setup() {
+ JS('', r"""
+(function(){
+ function A() {};
+ makeA = function() { return new A(); };
+ function B() {};
+ makeB = function() { return new B(); };
+ function C() {};
+ makeC = function() { return new C(); };
+ function D() {};
+ makeD = function() { return new D(); };
-self.nativeConstructor(A);
-self.nativeConstructor(B);
-self.nativeConstructor(C);
-self.nativeConstructor(D);
-""";
+ self.nativeConstructor(A);
+ self.nativeConstructor(B);
+ self.nativeConstructor(C);
+ self.nativeConstructor(D);
+})()
+""");
+}
checkTest(value, expectComparable, expectPattern) {
Expect.equals(expectComparable, value is Comparable);
« no previous file with comments | « tests/compiler/dart2js_native/abstract_class_test.dart ('k') | tests/compiler/dart2js_native/downcast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698