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

Unified Diff: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart

Issue 2974223002: Support is tests (Closed)
Patch Set: Cleanup 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/type_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
diff --git a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
index fd3572443d2b4e3c3aa78828a2afc993b4265203..7bd194d1649c3133115446cdb8ed186057fc5a6b 100644
--- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
+++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
@@ -50,6 +50,7 @@ const List<Test> TESTS = const <Test>[
const Test(const {
'main.dart': '''
import 'dart:html';
+import 'package:expect/expect.dart';
foo({named}) => 1;
bar(a) => !a;
@@ -71,6 +72,8 @@ class SubClass extends Class {
}
}
+class Generic<T> {}
sra1 2017/07/11 21:46:25 This could be a separate test.
Johnni Winther 2017/07/12 07:51:30 Actually, I needed a generic class to trigger the
+
var toplevel;
main() {
@@ -123,9 +126,19 @@ main() {
break;
}
x = toplevel;
+ x = testIs(x);
+ x = testAsGeneric(x);
+ x = testAsFunction(x);
print(x);
return x;
}
+typedef NoArg();
+@NoInline()
+testIs(o) => o is Generic<int> || o is NoArg;
+@NoInline()
+testAsGeneric(o) => o as Generic<int>;
+@NoInline()
+testAsFunction(o) => o as NoArg;
'''
}),
const Test(const {
« no previous file with comments | « pkg/compiler/lib/src/ssa/type_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698