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

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

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test 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/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 41a41094aeb83e3a9ec100f4c4485923a48e0ca8..261acf7f757db901afa2036b61c4d44218d4e9de 100644
--- a/tests/compiler/dart2js_native/core_type_check_native_test.dart
+++ b/tests/compiler/dart2js_native/core_type_check_native_test.dart
@@ -8,25 +8,21 @@ import "package:expect/expect.dart";
var inscrutable = (int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
@Native("A")
-class A {
-}
+class A {}
@Native("B")
-class B implements Comparable {
-}
+class B implements Comparable {}
@Native("C")
-class C implements Pattern {
-}
+class C implements Pattern {}
@Native("D")
-class D implements Pattern, Comparable {
-}
+class D implements Pattern, Comparable {}
-makeA() native;
-makeB() native;
-makeC() native;
-makeD() native;
+makeA() native ;
+makeB() native ;
+makeC() native ;
+makeD() native ;
void setup() native """
function A() {};
@@ -39,7 +35,6 @@ function D() {};
makeD = function() { return new D; }
""";
-
checkTest(value, expectComparable, expectPattern) {
Expect.equals(expectComparable, value is Comparable);
Expect.equals(expectPattern, value is Pattern);
@@ -59,19 +54,28 @@ checkCast(value, expectComparable, expectPattern) {
}
checkAll(check) {
- var things =
- [[], 4, 4.2, 'foo', new Object(), makeA(), makeB(), makeC(), makeD()];
+ var things = [
+ [],
+ 4,
+ 4.2,
+ 'foo',
+ new Object(),
+ makeA(),
+ makeB(),
+ makeC(),
+ makeD()
+ ];
value(i) => things[inscrutable(i)];
- check(value(0), false, false); // List
- check(value(1), true, false); // int
- check(value(2), true, false); // num
- check(value(3), true, true); // String
- check(value(4), false, false); // Object
- check(value(5), false, false); // A
- check(value(6), true, false); // B
- check(value(7), false, true); // C
- check(value(8), true, true); // D
+ check(value(0), false, false); // List
+ check(value(1), true, false); // int
+ check(value(2), true, false); // num
+ check(value(3), true, true); // String
+ check(value(4), false, false); // Object
+ check(value(5), false, false); // A
+ check(value(6), true, false); // B
+ check(value(7), false, true); // C
+ check(value(8), true, true); // D
}
main() {
« no previous file with comments | « tests/compiler/dart2js_native/compiler_test_internals.dart ('k') | tests/compiler/dart2js_native/downcast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698