| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 rect_test; | 5 library rect_test; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import '../../pkg/unittest/lib/unittest.dart'; | 8 import '../../pkg/unittest/lib/unittest.dart'; |
| 9 import '../../pkg/unittest/lib/html_config.dart'; | 9 import '../../pkg/unittest/lib/html_config.dart'; |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 test('toInt', () { | 140 test('toInt', () { |
| 141 var rect = new Rect(11.4, 26.6, 17.8, 9.2); | 141 var rect = new Rect(11.4, 26.6, 17.8, 9.2); |
| 142 var b = rect.toInt(); | 142 var b = rect.toInt(); |
| 143 expect(b, new Rect(11, 26, 17, 9)); | 143 expect(b, new Rect(11, 26, 17, 9)); |
| 144 | 144 |
| 145 expect(b.left is int, isTrue); | 145 expect(b.left is int, isTrue); |
| 146 expect(b.top is int, isTrue); | 146 expect(b.top is int, isTrue); |
| 147 expect(b.width is int, isTrue); | 147 expect(b.width is int, isTrue); |
| 148 expect(b.height is int, isTrue); | 148 expect(b.height is int, isTrue); |
| 149 }); | 149 }); |
| 150 |
| 151 test('hashCode', () { |
| 152 var a = new Rect(0, 1, 2, 3); |
| 153 var b = new Rect(0, 1, 2, 3); |
| 154 expect(a.hashCode, b.hashCode); |
| 155 |
| 156 var c = new Rect(1, 0, 2, 3); |
| 157 expect(a.hashCode == c.hashCode, isFalse); |
| 158 }); |
| 150 } | 159 } |
| OLD | NEW |