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

Unified Diff: tests/html/point_test.dart

Issue 25785003: "Reverting 28184" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/element_test.dart ('k') | tests/html/rect_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/point_test.dart
diff --git a/tests/lib/math/point_test.dart b/tests/html/point_test.dart
similarity index 90%
rename from tests/lib/math/point_test.dart
rename to tests/html/point_test.dart
index d56c52904ed7c5db36726e432af2089b63a7e5ee..ef1fe5a6c42f1357e3d2c3bab48a017f55cde9bb 100644
--- a/tests/lib/math/point_test.dart
+++ b/tests/html/point_test.dart
@@ -4,10 +4,13 @@
library point_test;
-import 'dart:math';
-import 'package:unittest/unittest.dart';
+import 'dart:html';
+import '../../pkg/unittest/lib/unittest.dart';
+import '../../pkg/unittest/lib/html_config.dart';
main() {
+ useHtmlConfiguration();
+
test('constructor', () {
var point = new Point();
expect(point.x, 0);
@@ -16,21 +19,21 @@ main() {
});
test('constructor X', () {
- var point = new Point<int>(10);
+ var point = new Point(10);
expect(point.x, 10);
expect(point.y, 0);
expect('$point', '(10, 0)');
});
test('constructor X Y', () {
- var point = new Point<int>(10, 20);
+ var point = new Point(10, 20);
expect(point.x, 10);
expect(point.y, 20);
expect('$point', '(10, 20)');
});
test('constructor X Y double', () {
- var point = new Point<double>(10.5, 20.897);
+ var point = new Point(10.5, 20.897);
expect(point.x, 10.5);
expect(point.y, 20.897);
expect('$point', '(10.5, 20.897)');
@@ -93,9 +96,9 @@ main() {
expect(b.round(), new Point(5, 10));
});
- test('truncate', () {
+ test('toInt', () {
var a = new Point(5.1, 10.8);
- var b = a.truncate();
+ var b = a.toInt();
expect(b, new Point(5, 10));
expect(b.x is int, isTrue);
expect(b.y is int, isTrue);
« no previous file with comments | « tests/html/element_test.dart ('k') | tests/html/rect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698