OLD | NEW |
1 import 'dart:html'; | 1 import 'dart:html'; |
2 import 'package:js/js.dart'; | 2 import 'package:js/js.dart'; |
3 import 'package:expect/expect.dart'; | 3 import 'package:expect/expect.dart'; |
4 | 4 |
5 @JS() | 5 @JS() |
6 @anonymous | 6 @anonymous |
7 class C { | 7 class C { |
8 final foo; | 8 final foo; |
9 | 9 |
10 external factory C({foo}); | 10 external factory C({foo}); |
(...skipping 29 matching lines...) Expand all Loading... |
40 String s = i; // Test for checked mode. | 40 String s = i; // Test for checked mode. |
41 } on TypeError catch (error) { | 41 } on TypeError catch (error) { |
42 Expect.throws(f, (ex) => ex is TypeError); | 42 Expect.throws(f, (ex) => ex is TypeError); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 main() { | 46 main() { |
47 var d = new D(foo: 4); | 47 var d = new D(foo: 4); |
48 var f = new F(6); | 48 var f = new F(6); |
49 Expect.equals(testC(d), 4); | 49 Expect.equals(testC(d), 4); |
50 Expect.equals(testF(f), 6); /// 01: ok | 50 Expect.equals(testF(f), 6); //# 01: ok |
51 } | 51 } |
52 | 52 |
53 | 53 |
OLD | NEW |