| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 // Test for values of some basic types. | 7 // Test for values of some basic types. |
| 8 | 8 |
| 9 | 9 |
| 10 class A native "*A" { | 10 class A native "A" { |
| 11 returnNull() native; | 11 returnNull() native; |
| 12 returnUndefined() native; | 12 returnUndefined() native; |
| 13 returnEmptyString() native; | 13 returnEmptyString() native; |
| 14 returnZero() native; | 14 returnZero() native; |
| 15 } | 15 } |
| 16 | 16 |
| 17 A makeA() native; | 17 A makeA() native; |
| 18 | 18 |
| 19 void setup() native """ | 19 void setup() native """ |
| 20 function A() {} | 20 function A() {} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 Expect.equals(null, a.returnNull()); | 32 Expect.equals(null, a.returnNull()); |
| 33 Expect.equals(null, a.returnUndefined()); | 33 Expect.equals(null, a.returnUndefined()); |
| 34 | 34 |
| 35 Expect.equals('', a.returnEmptyString()); | 35 Expect.equals('', a.returnEmptyString()); |
| 36 Expect.isTrue(a.returnEmptyString().isEmpty); | 36 Expect.isTrue(a.returnEmptyString().isEmpty); |
| 37 Expect.isTrue(a.returnEmptyString() is String); | 37 Expect.isTrue(a.returnEmptyString() is String); |
| 38 | 38 |
| 39 Expect.isTrue(a.returnZero() is int); | 39 Expect.isTrue(a.returnZero() is int); |
| 40 Expect.equals(0, a.returnZero()); | 40 Expect.equals(0, a.returnZero()); |
| 41 } | 41 } |
| OLD | NEW |