Convert Intl from unittest to test
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159147145
diff --git a/pubspec.yaml b/pubspec.yaml
index eadf150..7a28ee0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -10,7 +10,7 @@
path: '>=0.9.0 <2.0.0'
dev_dependencies:
fixnum: '>=0.9.0 <0.11.0'
- unittest: '>=0.10.0 <0.12.0'
+ test: '>=0.12.0 <0.13.0'
transformers:
- $dart2js:
$exclude:
diff --git a/test/bidi_format_test.dart b/test/bidi_format_test.dart
index 5b48dd6..2421c85 100644
--- a/test/bidi_format_test.dart
+++ b/test/bidi_format_test.dart
@@ -5,7 +5,7 @@
library bidi_format_test;
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
/// Tests the bidirectional text formatting library.
main() {
diff --git a/test/bidi_utils_test.dart b/test/bidi_utils_test.dart
index bd89f92..a6f0832 100644
--- a/test/bidi_utils_test.dart
+++ b/test/bidi_utils_test.dart
@@ -5,7 +5,7 @@
library bidi_utils_test;
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
/// Tests the bidi utilities library.
main() {
diff --git a/test/date_time_format_file_even_test.dart b/test/date_time_format_file_even_test.dart
index 6360e47..1ff0fcf 100644
--- a/test/date_time_format_file_even_test.dart
+++ b/test/date_time_format_file_even_test.dart
@@ -6,14 +6,14 @@
/// local file system. This tests one half the locales, since testing all
/// of them takes long enough that it may cause timeouts in the test bots.
+@Timeout(const Duration(seconds: 60))
library date_time_format_file_test_2;
import 'date_time_format_test_stub.dart';
import 'data_directory.dart';
import 'package:intl/date_symbol_data_file.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
- unittestConfiguration.timeout = new Duration(seconds: 60);
runWith(evenLocales, dataDirectory, initializeDateFormatting);
}
diff --git a/test/date_time_format_file_odd_test.dart b/test/date_time_format_file_odd_test.dart
index 4f4996a..6d7e7b0 100644
--- a/test/date_time_format_file_odd_test.dart
+++ b/test/date_time_format_file_odd_test.dart
@@ -6,14 +6,14 @@
/// local file system. This tests one half the locales, since testing all
/// of them takes long enough that it may cause timeouts in the test bots.
+@Timeout(const Duration(seconds: 60))
library date_time_format_file_test_1;
import 'date_time_format_test_stub.dart';
import 'data_directory.dart';
import 'package:intl/date_symbol_data_file.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
- unittestConfiguration.timeout = new Duration(seconds: 60);
runWith(oddLocales, dataDirectory, initializeDateFormatting);
}
diff --git a/test/date_time_format_http_request_test.dart b/test/date_time_format_http_request_test.dart
deleted file mode 100644
index f907fb5..0000000
--- a/test/date_time_format_http_request_test.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// or details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Test date formatting and parsing using locale data read via an http request
-/// to a server.
-
-library date_time_format_http_request_test;
-
-import 'dart:html';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:intl/date_symbol_data_http_request.dart';
-import 'date_time_format_test_stub.dart';
-
-main() {
- useHtmlConfiguration();
- var url = "http://localhost:${window.location.port}"
- "/packages/intl/src/data/dates/";
-
- test("Initializing a locale that needs fallback", () {
- initializeDateFormatting("de_DE", url).then(expectAsync((_) => true));
- });
-
- runWith(smallSetOfLocales, url, initializeDateFormatting);
-}
diff --git a/test/date_time_format_test_core.dart b/test/date_time_format_test_core.dart
index 4201912..55519de 100644
--- a/test/date_time_format_test_core.dart
+++ b/test/date_time_format_test_core.dart
@@ -8,7 +8,7 @@
library date_time_format_tests;
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'date_time_format_test_data.dart';
import 'package:intl/intl.dart';
diff --git a/test/date_time_format_test_stub.dart b/test/date_time_format_test_stub.dart
index 52a83a5..b6c3f9d 100644
--- a/test/date_time_format_test_stub.dart
+++ b/test/date_time_format_test_stub.dart
@@ -8,7 +8,7 @@
library date_time_format_test;
import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'package:intl/intl.dart';
import 'date_time_format_test_core.dart';
diff --git a/test/date_time_loose_parsing_test.dart b/test/date_time_loose_parsing_test.dart
index 4b8b058..aa4fdf7 100644
--- a/test/date_time_loose_parsing_test.dart
+++ b/test/date_time_loose_parsing_test.dart
@@ -11,7 +11,7 @@
import 'package:intl/date_symbol_data_local.dart';
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
var format;
diff --git a/test/date_time_strict_test.dart b/test/date_time_strict_test.dart
index f7ed30e..cc5f597 100644
--- a/test/date_time_strict_test.dart
+++ b/test/date_time_strict_test.dart
@@ -8,7 +8,7 @@
library date_time_strict_test;
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
test("All input consumed", () {
diff --git a/test/find_default_locale_browser_test.dart b/test/find_default_locale_browser_test.dart
index f25f7ea..8aac05a 100644
--- a/test/find_default_locale_browser_test.dart
+++ b/test/find_default_locale_browser_test.dart
@@ -2,16 +2,14 @@
// 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.
+@TestOn("browser")
library find_default_locale_browser_test;
-import 'package:unittest/html_config.dart';
import 'package:intl/intl.dart';
import 'package:intl/intl_browser.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
- useHtmlConfiguration();
-
test("Find system locale in browser", () {
// TODO (alanknight): This only verifies that we found some locale. We
// should find a way to force the system locale before the test is run
diff --git a/test/find_default_locale_standalone_test.dart b/test/find_default_locale_standalone_test.dart
index 14b80b0..10d5f27 100644
--- a/test/find_default_locale_standalone_test.dart
+++ b/test/find_default_locale_standalone_test.dart
@@ -2,11 +2,10 @@
// 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.
-library find_default_locale_browser_test;
-
+@TestOn("vm")
import 'package:intl/intl.dart';
import 'package:intl/intl_standalone.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
main() {
test("Find system locale standalone", () {
diff --git a/test/fixnum_test.dart b/test/fixnum_test.dart
index 9a8c346..12978b3 100644
--- a/test/fixnum_test.dart
+++ b/test/fixnum_test.dart
@@ -5,7 +5,7 @@
library fixnum_test;
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'package:fixnum/fixnum.dart';
var int64Values = {
diff --git a/test/intl_test.dart b/test/intl_test.dart
index 5e2946e..e19ed5a 100644
--- a/test/intl_test.dart
+++ b/test/intl_test.dart
@@ -5,7 +5,7 @@
library intl_test;
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'package:intl/date_symbol_data_local.dart';
main() {
diff --git a/test/number_closure_test.dart b/test/number_closure_test.dart
index 5f31d2a..af43bda 100644
--- a/test/number_closure_test.dart
+++ b/test/number_closure_test.dart
@@ -6,7 +6,7 @@
import 'dart:async';
import "package:intl/intl.dart";
-import "package:unittest/unittest.dart";
+import "package:test/test.dart";
main() {
test("testVeryBigNumber", testVeryBigNumber);
diff --git a/test/number_format_compact_test.dart b/test/number_format_compact_test.dart
index 9186beb..607dc20 100644
--- a/test/number_format_compact_test.dart
+++ b/test/number_format_compact_test.dart
@@ -4,7 +4,7 @@
/// Tests for compact format numbers, e.g. 1.2M rather than 1,200,000
import 'dart:math';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'package:intl/intl.dart';
import 'package:fixnum/fixnum.dart';
import 'compact_number_test_data.dart' as testdata;
diff --git a/test/number_format_test.dart b/test/number_format_test.dart
index 8c728b1..8ba75e4 100644
--- a/test/number_format_test.dart
+++ b/test/number_format_test.dart
@@ -4,7 +4,7 @@
library number_format_test;
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
import 'package:intl/number_symbols_data.dart';
import 'package:intl/intl.dart';
import 'number_test_data.dart';
diff --git a/test/plural_test.dart b/test/plural_test.dart
index cb4f81c..65a5f67 100644
--- a/test/plural_test.dart
+++ b/test/plural_test.dart
@@ -10,7 +10,7 @@
library plural_test;
import 'package:intl/intl.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
/// Hard-coded expected values for a Russian plural rule.
///