Use the new test runner.
R=lrn@google.com
Review URL: https://codereview.chromium.org//1385333007 .
diff --git a/.gitignore b/.gitignore
index 89f7747..25a1df3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@
.settings/
build/
packages
+.packages
pubspec.lock
diff --git a/.status b/.status
deleted file mode 100644
index ebc5f81..0000000
--- a/.status
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Skip non-test files ending with "_test".
-packages/*: Skip
-*/packages/*: Skip
-*/*/packages/*: Skip
-*/*/*/packages/*: Skip
-*/*/*/*packages/*: Skip
-*/*/*/*/*packages/*: Skip
-
diff --git a/.test_config b/.test_config
new file mode 100644
index 0000000..2535563
--- /dev/null
+++ b/.test_config
@@ -0,0 +1,3 @@
+{
+ "test_package": true
+}
diff --git a/pubspec.yaml b/pubspec.yaml
index c804a6a..c54a860 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -4,6 +4,6 @@
description: Utility functions and classes related to the 'dart:typed_data' library.
homepage: https://github.com/dart-lang/typed_data
dev_dependencies:
- unittest: ">=0.9.0 <0.10.0"
+ test: "^0.12.0"
environment:
- sdk: ">=1.5.0 <2.0.0"
+ sdk: ">=1.8.0 <2.0.0"
diff --git a/test/typed_buffers_test.dart b/test/typed_buffers_test.dart
index 1cb37b0..b5f907c 100644
--- a/test/typed_buffers_test.dart
+++ b/test/typed_buffers_test.dart
@@ -4,10 +4,11 @@
// Tests typed-data buffer classes.
-import "package:typed_data/typed_buffers.dart";
-import "package:unittest/unittest.dart";
import "dart:typed_data";
+import "package:test/test.dart";
+import "package:typed_data/typed_buffers.dart";
+
main() {
testUint(8, (l) => new Uint8Buffer(l));
testInt(8, (l) => new Int8Buffer(l));
@@ -18,8 +19,12 @@
testInt(16, (l) => new Int16Buffer(l));
testUint(32, (l) => new Uint32Buffer(l)); /// 01: ok
testInt(32, (l) => new Int32Buffer(l));
- testUint(64, (l) => new Uint64Buffer(l)); /// 01: continued
- testInt(64, (l) => new Int64Buffer(l)); /// 01: continued
+ testUint(64, (l) => new Uint64Buffer(l), /// 01: continued
+ // JS doesn't support 64-bit ints, so only test this on the VM.
+ testOn: "dart-vm");
+ testInt(64, (l) => new Int64Buffer(l), /// 01: continued
+ // JS doesn't support 64-bit ints, so only test this on the VM.
+ testOn: "dart-vm");
testInt32x4Buffer(intSamples);
@@ -52,21 +57,21 @@
int clampUint8(x) => x < 0 ? 0 : x > 255 ? 255 : x;
-void testUint(int bits, var buffer) {
+void testUint(int bits, var buffer, {String testOn}) {
int min = 0;
Function round = roundUint(bits);
int max = round(-1);
test("Uint${bits}Buffer", () {
testIntBuffer(bits, min, max, buffer, round);
- });
+ }, testOn: testOn);
}
-void testInt(int bits, var buffer) {
+void testInt(int bits, var buffer, {String testOn}) {
int min = -(1 << (bits - 1));
int max = -(min + 1);
test("Int${bits}Buffer", () {
testIntBuffer(bits, min, max, buffer, roundInt(bits));
- });
+ }, testOn: testOn);
}
const List<int> intSamples = const [