Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 810432e

Browse files
committed
Convert Intl from unittest to test
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=159147145
1 parent f8ad835 commit 810432e

18 files changed

+21
-50
lines changed

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
path: '>=0.9.0 <2.0.0'
1111
dev_dependencies:
1212
fixnum: '>=0.9.0 <0.11.0'
13-
unittest: '>=0.10.0 <0.12.0'
13+
test: '>=0.12.0 <0.13.0'
1414
transformers:
1515
- $dart2js:
1616
$exclude:

test/bidi_format_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
library bidi_format_test;
66

77
import 'package:intl/intl.dart';
8-
import 'package:unittest/unittest.dart';
8+
import 'package:test/test.dart';
99

1010
/// Tests the bidirectional text formatting library.
1111
main() {

test/bidi_utils_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
library bidi_utils_test;
66

77
import 'package:intl/intl.dart';
8-
import 'package:unittest/unittest.dart';
8+
import 'package:test/test.dart';
99

1010
/// Tests the bidi utilities library.
1111
main() {

test/date_time_format_file_even_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
/// local file system. This tests one half the locales, since testing all
77
/// of them takes long enough that it may cause timeouts in the test bots.
88
9+
@Timeout(const Duration(seconds: 60))
910
library date_time_format_file_test_2;
1011

1112
import 'date_time_format_test_stub.dart';
1213
import 'data_directory.dart';
1314
import 'package:intl/date_symbol_data_file.dart';
14-
import 'package:unittest/unittest.dart';
15+
import 'package:test/test.dart';
1516

1617
main() {
17-
unittestConfiguration.timeout = new Duration(seconds: 60);
1818
runWith(evenLocales, dataDirectory, initializeDateFormatting);
1919
}

test/date_time_format_file_odd_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
/// local file system. This tests one half the locales, since testing all
77
/// of them takes long enough that it may cause timeouts in the test bots.
88
9+
@Timeout(const Duration(seconds: 60))
910
library date_time_format_file_test_1;
1011

1112
import 'date_time_format_test_stub.dart';
1213
import 'data_directory.dart';
1314
import 'package:intl/date_symbol_data_file.dart';
14-
import 'package:unittest/unittest.dart';
15+
import 'package:test/test.dart';
1516

1617
main() {
17-
unittestConfiguration.timeout = new Duration(seconds: 60);
1818
runWith(oddLocales, dataDirectory, initializeDateFormatting);
1919
}

test/date_time_format_http_request_test.dart

-26
This file was deleted.

test/date_time_format_test_core.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
library date_time_format_tests;
1010

11-
import 'package:unittest/unittest.dart';
11+
import 'package:test/test.dart';
1212
import 'date_time_format_test_data.dart';
1313
import 'package:intl/intl.dart';
1414

test/date_time_format_test_stub.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
library date_time_format_test;
99

1010
import 'dart:async';
11-
import 'package:unittest/unittest.dart';
11+
import 'package:test/test.dart';
1212
import 'package:intl/intl.dart';
1313
import 'date_time_format_test_core.dart';
1414

test/date_time_loose_parsing_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ library date_time_loose_test;
1111

1212
import 'package:intl/date_symbol_data_local.dart';
1313
import 'package:intl/intl.dart';
14-
import 'package:unittest/unittest.dart';
14+
import 'package:test/test.dart';
1515

1616
main() {
1717
var format;

test/date_time_strict_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
library date_time_strict_test;
99

1010
import 'package:intl/intl.dart';
11-
import 'package:unittest/unittest.dart';
11+
import 'package:test/test.dart';
1212

1313
main() {
1414
test("All input consumed", () {

test/find_default_locale_browser_test.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
@TestOn("browser")
56
library find_default_locale_browser_test;
67

7-
import 'package:unittest/html_config.dart';
88
import 'package:intl/intl.dart';
99
import 'package:intl/intl_browser.dart';
10-
import 'package:unittest/unittest.dart';
10+
import 'package:test/test.dart';
1111

1212
main() {
13-
useHtmlConfiguration();
14-
1513
test("Find system locale in browser", () {
1614
// TODO (alanknight): This only verifies that we found some locale. We
1715
// should find a way to force the system locale before the test is run

test/find_default_locale_standalone_test.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library find_default_locale_browser_test;
6-
5+
@TestOn("vm")
76
import 'package:intl/intl.dart';
87
import 'package:intl/intl_standalone.dart';
9-
import 'package:unittest/unittest.dart';
8+
import 'package:test/test.dart';
109

1110
main() {
1211
test("Find system locale standalone", () {

test/fixnum_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
library fixnum_test;
66

77
import 'package:intl/intl.dart';
8-
import 'package:unittest/unittest.dart';
8+
import 'package:test/test.dart';
99
import 'package:fixnum/fixnum.dart';
1010

1111
var int64Values = {

test/intl_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
library intl_test;
66

77
import 'package:intl/intl.dart';
8-
import 'package:unittest/unittest.dart';
8+
import 'package:test/test.dart';
99
import 'package:intl/date_symbol_data_local.dart';
1010

1111
main() {

test/number_closure_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ library number_closure_test;
66

77
import 'dart:async';
88
import "package:intl/intl.dart";
9-
import "package:unittest/unittest.dart";
9+
import "package:test/test.dart";
1010

1111
main() {
1212
test("testVeryBigNumber", testVeryBigNumber);

test/number_format_compact_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
/// Tests for compact format numbers, e.g. 1.2M rather than 1,200,000
66
import 'dart:math';
7-
import 'package:unittest/unittest.dart';
7+
import 'package:test/test.dart';
88
import 'package:intl/intl.dart';
99
import 'package:fixnum/fixnum.dart';
1010
import 'compact_number_test_data.dart' as testdata;

test/number_format_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
library number_format_test;
66

7-
import 'package:unittest/unittest.dart';
7+
import 'package:test/test.dart';
88
import 'package:intl/number_symbols_data.dart';
99
import 'package:intl/intl.dart';
1010
import 'number_test_data.dart';

test/plural_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
library plural_test;
1111

1212
import 'package:intl/intl.dart';
13-
import 'package:unittest/unittest.dart';
13+
import 'package:test/test.dart';
1414

1515
/// Hard-coded expected values for a Russian plural rule.
1616
///

0 commit comments

Comments
 (0)