| 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);
|
|
|