Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1113)

Side by Side Diff: dart/tests/lib/math/point_test.dart

Issue 66253002: Version 0.8.10.9 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/tests/language/language_analyzer.status ('k') | dart/tools/VERSION » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 point_test; 5 library point_test;
6 6
7 import 'dart:math'; 7 import 'dart:math';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 main() { 10 main() {
11 test('constructor', () { 11 test('constructor', () {
12 var point = new Point(); 12 var point = new Point(0, 0);
13 expect(point.x, 0); 13 expect(point.x, 0);
14 expect(point.y, 0); 14 expect(point.y, 0);
15 expect('$point', 'Point(0, 0)'); 15 expect('$point', 'Point(0, 0)');
16 }); 16 });
17 17
18 test('constructor X', () { 18 test('constructor X', () {
19 var point = new Point<int>(10); 19 var point = new Point<int>(10, 0);
20 expect(point.x, 10); 20 expect(point.x, 10);
21 expect(point.y, 0); 21 expect(point.y, 0);
22 expect('$point', 'Point(10, 0)'); 22 expect('$point', 'Point(10, 0)');
23 }); 23 });
24 24
25 test('constructor X Y', () { 25 test('constructor X Y', () {
26 var point = new Point<int>(10, 20); 26 var point = new Point<int>(10, 20);
27 expect(point.x, 10); 27 expect(point.x, 10);
28 expect(point.y, 20); 28 expect(point.y, 20);
29 expect('$point', 'Point(10, 20)'); 29 expect('$point', 'Point(10, 20)');
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 test('magnitute', () { 81 test('magnitute', () {
82 var a = new Point(5, 10); 82 var a = new Point(5, 10);
83 var b = new Point(0, 0); 83 var b = new Point(0, 0);
84 expect(a.magnitude, a.distanceTo(b)); 84 expect(a.magnitude, a.distanceTo(b));
85 expect(b.magnitude, 0); 85 expect(b.magnitude, 0);
86 86
87 var c = new Point(-5, -10); 87 var c = new Point(-5, -10);
88 expect(c.magnitude, a.distanceTo(b)); 88 expect(c.magnitude, a.distanceTo(b));
89 }); 89 });
90 } 90 }
OLDNEW
« no previous file with comments | « dart/tests/language/language_analyzer.status ('k') | dart/tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698