| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Common test code that is run by 3 tests: mirrors_test.dart, | 5 /// Common test code that is run by 3 tests: mirrors_test.dart, |
| 6 /// mirrors_used_test.dart, and static_test.dart. | 6 /// mirrors_used_test.dart, and static_test.dart. |
| 7 library smoke.test.common; | 7 library smoke.test.common; |
| 8 | 8 |
| 9 import 'package:smoke/smoke.dart' as smoke; | 9 import 'package:smoke/smoke.dart' as smoke; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // TODO(sigmund): should we support declaring a setter with no getter? | 115 // TODO(sigmund): should we support declaring a setter with no getter? |
| 116 // expect(smoke.hasSetter(E, #x), isTrue); | 116 // expect(smoke.hasSetter(E, #x), isTrue); |
| 117 expect(smoke.hasSetter(E, #y), isFalse); | 117 expect(smoke.hasSetter(E, #y), isFalse); |
| 118 expect(smoke.hasSetter(E, #z), isFalse); // don't consider noSuchMethod | 118 expect(smoke.hasSetter(E, #z), isFalse); // don't consider noSuchMethod |
| 119 }); | 119 }); |
| 120 | 120 |
| 121 test('no such method', () { | 121 test('no such method', () { |
| 122 expect(smoke.hasNoSuchMethod(A), isFalse); | 122 expect(smoke.hasNoSuchMethod(A), isFalse); |
| 123 expect(smoke.hasNoSuchMethod(E), isTrue); | 123 expect(smoke.hasNoSuchMethod(E), isTrue); |
| 124 expect(smoke.hasNoSuchMethod(E2), isTrue); | 124 expect(smoke.hasNoSuchMethod(E2), isTrue); |
| 125 expect(smoke.hasNoSuchMethod(int), isFalse); | |
| 126 }); | 125 }); |
| 127 | 126 |
| 128 test('has instance method', () { | 127 test('has instance method', () { |
| 129 expect(smoke.hasInstanceMethod(A, #inc0), isTrue); | 128 expect(smoke.hasInstanceMethod(A, #inc0), isTrue); |
| 130 expect(smoke.hasInstanceMethod(A, #inc3), isFalse); | 129 expect(smoke.hasInstanceMethod(A, #inc3), isFalse); |
| 131 expect(smoke.hasInstanceMethod(C, #inc), isTrue); | 130 expect(smoke.hasInstanceMethod(C, #inc), isTrue); |
| 132 expect(smoke.hasInstanceMethod(D, #inc), isTrue); | 131 expect(smoke.hasInstanceMethod(D, #inc), isTrue); |
| 133 expect(smoke.hasInstanceMethod(D, #inc0), isTrue); | 132 expect(smoke.hasInstanceMethod(D, #inc0), isTrue); |
| 134 expect(smoke.hasInstanceMethod(F, #staticMethod), isFalse); | 133 expect(smoke.hasInstanceMethod(F, #staticMethod), isFalse); |
| 135 expect(smoke.hasInstanceMethod(F2, #staticMethod), isFalse); | 134 expect(smoke.hasInstanceMethod(F2, #staticMethod), isFalse); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 @a2 int d; | 381 @a2 int d; |
| 383 } | 382 } |
| 384 | 383 |
| 385 class H extends G { | 384 class H extends G { |
| 386 int e; | 385 int e; |
| 387 @a1 int f; | 386 @a1 int f; |
| 388 @a1 int g; | 387 @a1 int g; |
| 389 @a2 int h; | 388 @a2 int h; |
| 390 @a3 int i; | 389 @a3 int i; |
| 391 } | 390 } |
| OLD | NEW |