Index: pkg/intl/test/intl_message_basic_example_test.dart |
diff --git a/pkg/intl/test/intl_message_basic_example_test.dart b/pkg/intl/test/intl_message_basic_example_test.dart |
index d89ccd895f8ec9142d5379a84fd9a45efc0f2560..e9281eee2d6f222ac404a54976bfe8ec45af10d0 100644 |
--- a/pkg/intl/test/intl_message_basic_example_test.dart |
+++ b/pkg/intl/test/intl_message_basic_example_test.dart |
@@ -12,30 +12,28 @@ import '../example/basic/basic_example.dart'; |
import 'package:unittest/unittest.dart'; |
import 'dart:async'; |
-List list; |
- |
main() { |
- list = []; |
- setup(runAllTests, addToList); |
-} |
+ var list = []; |
+ var waitForIt = new Completer(); |
-var waitForIt = new Completer(); |
- |
-addToList(x) { |
- list.add(x); |
- if (list.length == 4) waitForIt.complete(list); |
-} |
+ addToList(x) { |
+ list.add(x); |
+ if (list.length == 4) { |
+ waitForIt.complete(list); |
+ } |
+ } |
-runAllTests(_) { |
- setup(runProgram, addToList); |
- waitForIt.future.then(actuallyRunTheTests); |
-} |
- |
-actuallyRunTheTests(_) { |
test('Verify basic example printing localized messages', () { |
- expect(list[0], "Ran at 00:00:00 on Thursday, January 1, 1970"); |
- expect(list[1], "Ausgedruckt am 00:00:00 am Donnerstag, 1. Januar 1970."); |
- expect(list[2], "วิ่ง 0:00:00 on วันพฤหัสบดี 1 มกราคม 1970."); |
- expect(list[3], "วิ่ง now on today."); |
+ runAllTests(_) { |
+ setup(expectAsync1(runProgram), addToList); |
+ } |
+ setup(expectAsync1(runAllTests), addToList); |
+ waitForIt.future.then(expectAsync1((_) { |
+ expect(list[0], "Ran at 00:00:00 on Thursday, January 1, 1970"); |
+ expect(list[1], "Ausgedruckt am 00:00:00 am Donnerstag, 1. Januar 1970."); |
+ expect(list[2], "วิ่ง 0:00:00 on วันพฤหัสบดี 1 มกราคม 1970."); |
+ expect(list[3], "วิ่ง now on today."); |
+ })); |
}); |
} |
+ |