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

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

Issue 2383273002: Revert "Add native_testing library to mock @Native classes" (Closed)
Patch Set: Created 4 years, 3 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/type_error_decode_test.dart
diff --git a/tests/compiler/dart2js_native/type_error_decode_test.dart b/tests/compiler/dart2js_native/type_error_decode_test.dart
index 1c37f03964a09acf09893036e71850a8f8c6b293..3c9a8f0ace7c5a0d482559c2113ec25c52208170 100644
--- a/tests/compiler/dart2js_native/type_error_decode_test.dart
+++ b/tests/compiler/dart2js_native/type_error_decode_test.dart
@@ -4,8 +4,9 @@
library test.type_error_decode_test;
-import 'native_testing.dart';
-import 'dart:_js_helper' show NullError, JsNoSuchMethodError;
+import 'package:expect/expect.dart';
+
+import 'dart:_js_helper';
class Foo {
var field;
@@ -40,19 +41,12 @@ main() {
var s = "Cannot call method 'foo' of null";
var nul = null;
var f = new Foo();
-
+ // This should foil code analysis so the variables aren't inlined below.
+ [].forEach((y) => f.field = nul = s = x = z = v = y);
expectThrows(() => x.fisk(), isNullError);
expectThrows(() => v.fisk(), isNullError);
expectThrows(() => z.fisk(), isJsNoSuchMethodError);
expectThrows(() => s.fisk(), isJsNoSuchMethodError);
expectThrows(() => null(), isNullError);
expectThrows(() => f.field(), isNullError);
-
- expectThrows(() => confuse(x).fisk(), isNullError);
- expectThrows(() => confuse(v).fisk(), isNullError);
- expectThrows(() => confuse(z).fisk(), isJsNoSuchMethodError);
- expectThrows(() => confuse(s).fisk(), isJsNoSuchMethodError);
- expectThrows(() => confuse(null)(), isNullError);
- expectThrows(() => confuse(f).field(), isNullError);
- expectThrows(() => confuse(f.field)(), isNullError);
}
« no previous file with comments | « tests/compiler/dart2js_native/super_property_test.dart ('k') | tests/compiler/dart2js_native/undefined_bailout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698