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

Side by Side Diff: tests/html/point_test.dart

Issue 12493003: Exposing Point & Rect types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to ToT Created 7 years, 9 months 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 | « tests/html/event_test.dart ('k') | tests/html/rect_test.dart » ('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:html'; 7 import 'dart:html';
8 import 'package:unittest/unittest.dart'; 8 import '../../pkg/unittest/lib/unittest.dart';
9 import 'package:unittest/html_config.dart'; 9 import '../../pkg/unittest/lib/html_config.dart';
10 10
11 main() { 11 main() {
12 useHtmlConfiguration(); 12 useHtmlConfiguration();
13 13
14 test('constructor', () { 14 test('constructor', () {
15 var point = new Point(); 15 var point = new Point();
16 expect(point.x, 0); 16 expect(point.x, 0);
17 expect(point.y, 0); 17 expect(point.y, 0);
18 expect('$point', '(0, 0)'); 18 expect('$point', '(0, 0)');
19 }); 19 });
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 }); 97 });
98 98
99 test('toInt', () { 99 test('toInt', () {
100 var a = new Point(5.1, 10.8); 100 var a = new Point(5.1, 10.8);
101 var b = a.toInt(); 101 var b = a.toInt();
102 expect(b, new Point(5, 10)); 102 expect(b, new Point(5, 10));
103 expect(b.x is int, isTrue); 103 expect(b.x is int, isTrue);
104 expect(b.y is int, isTrue); 104 expect(b.y is int, isTrue);
105 }); 105 });
106 } 106 }
OLDNEW
« no previous file with comments | « tests/html/event_test.dart ('k') | tests/html/rect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698