| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 /// Tests of fletch_test_suite.dart. | 5 /// Tests of dartino_test_suite.dart. |
| 6 library fletch_tests.self_tests; | 6 library dartino_tests.self_tests; |
| 7 | 7 |
| 8 import 'dart:async' show | 8 import 'dart:async' show |
| 9 Completer, | 9 Completer, |
| 10 Future; | 10 Future; |
| 11 | 11 |
| 12 import 'dart:convert' show | 12 import 'dart:convert' show |
| 13 JSON; | 13 JSON; |
| 14 | 14 |
| 15 import 'package:expect/expect.dart' show | 15 import 'package:expect/expect.dart' show |
| 16 Expect; | 16 Expect; |
| 17 | 17 |
| 18 import 'messages.dart'; | 18 import 'messages.dart'; |
| 19 | 19 |
| 20 import 'fletch_test_suite.dart' as suite show print; | 20 import 'dartino_test_suite.dart' as suite show print; |
| 21 | 21 |
| 22 /// Test sleeps for 3 seconds. | 22 /// Test sleeps for 3 seconds. |
| 23 Future testSleepForThreeSeconds() async { | 23 Future testSleepForThreeSeconds() async { |
| 24 await new Future.delayed(const Duration(seconds: 3)); | 24 await new Future.delayed(const Duration(seconds: 3)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 /// Always fails. | 27 /// Always fails. |
| 28 Future testAlwaysFails() async { | 28 Future testAlwaysFails() async { |
| 29 throw "This test always fails."; | 29 throw "This test always fails."; |
| 30 } | 30 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 45 testMessage(const RunTest("arg1")); | 45 testMessage(const RunTest("arg1")); |
| 46 testMessage(const TimedOut("arg1")); | 46 testMessage(const TimedOut("arg1")); |
| 47 testMessage(const TestFailed("arg1", "arg2", "arg3")); | 47 testMessage(const TestFailed("arg1", "arg2", "arg3")); |
| 48 testMessage(const TestPassed("arg1")); | 48 testMessage(const TestPassed("arg1")); |
| 49 testMessage(const Info("message")); | 49 testMessage(const Info("message")); |
| 50 testMessage(const TestStdoutLine("name", "line")); | 50 testMessage(const TestStdoutLine("name", "line")); |
| 51 } | 51 } |
| 52 | 52 |
| 53 /// Test print method. | 53 /// Test print method. |
| 54 Future testPrint() async { | 54 Future testPrint() async { |
| 55 suite.print("Debug print from fletch_tests works."); | 55 suite.print("Debug print from dartino_tests works."); |
| 56 } | 56 } |
| OLD | NEW |