| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library jsTest; | 5 library jsTest; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 | 8 |
| 9 import 'package:js/js.dart'; | |
| 10 | |
| 11 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 12 import 'package:unittest/html_individual_config.dart'; | 10 import 'package:unittest/html_individual_config.dart'; |
| 13 import 'package:expect/expect.dart' show NoInline, AssumeDynamic; | 11 import 'package:expect/expect.dart' show NoInline, AssumeDynamic; |
| 14 | 12 |
| 15 @JS() | 13 import 'js_type_test_lib.dart'; |
| 16 class Foo { | |
| 17 external factory Foo(); | |
| 18 } | |
| 19 | 14 |
| 20 class Bar {} | 15 class Bar {} |
| 21 | 16 |
| 22 @NoInline() @AssumeDynamic() | 17 @NoInline() @AssumeDynamic() |
| 23 confuse(x) => x; | 18 confuse(x) => x; |
| 24 | 19 |
| 25 class Is<T> { | 20 class Is<T> { |
| 26 const Is(); | 21 const Is(); |
| 27 check(o) => o is T; | 22 check(o) => o is T; |
| 28 } | 23 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 }); | 137 }); |
| 143 | 138 |
| 144 group('dynamic-null-not-dynamic-Foo', () { | 139 group('dynamic-null-not-dynamic-Foo', () { |
| 145 test('test', () { | 140 test('test', () { |
| 146 var e = confuse(null); | 141 var e = confuse(null); |
| 147 expect(const Is<Foo>().check(e), isFalse); | 142 expect(const Is<Foo>().check(e), isFalse); |
| 148 }); | 143 }); |
| 149 }); | 144 }); |
| 150 | 145 |
| 151 } | 146 } |
| OLD | NEW |