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 import 'dart:math'; | 5 import 'dart:math'; |
6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
7 | 7 |
8 main() { | 8 main() { |
9 // constructor | 9 // constructor |
10 { | 10 { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 { | 90 { |
91 var a = new Point(5, 10); | 91 var a = new Point(5, 10); |
92 var b = new Point(0, 0); | 92 var b = new Point(0, 0); |
93 Expect.equals(a.distanceTo(b), a.magnitude); | 93 Expect.equals(a.distanceTo(b), a.magnitude); |
94 Expect.equals(0, b.magnitude); | 94 Expect.equals(0, b.magnitude); |
95 | 95 |
96 var c = new Point(-5, -10); | 96 var c = new Point(-5, -10); |
97 Expect.equals(a.distanceTo(b), c.magnitude); | 97 Expect.equals(a.distanceTo(b), c.magnitude); |
98 } | 98 } |
99 } | 99 } |
OLD | NEW |