OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE.md file. | |
4 | |
5 /// Modify this file to include more tests. | |
6 library fletch_tests.all_tests; | |
7 | |
8 import 'dart:async' show | |
9 Completer, | |
10 Future; | |
11 | |
12 import 'self_tests.dart' as self; | |
13 | |
14 import 'verb_tests.dart' as verbs; | |
15 | |
16 import '../fletchc/incremental/production_mode.dart' as incremental_production; | |
17 | |
18 import '../fletchc/incremental/experimental_mode.dart' as | |
19 incremental_experimental; | |
20 | |
21 import '../fletchc/driver/test_control_stream.dart' as controlStream; | |
22 | |
23 import '../fletchc/serialize_settings_tests.dart' as serialize_settings_tests; | |
24 | |
25 import 'zone_helper_tests.dart' as zone_helper; | |
26 | |
27 import 'sentence_tests.dart' as sentence_tests; | |
28 | |
29 import 'message_tests.dart' as message_tests; | |
30 | |
31 import 'multiprogram_tests.dart' as multiprogram_tests; | |
32 | |
33 import 'snapshot_stacktrace_tests.dart' as snapshot_stacktrace_tests; | |
34 | |
35 import '../service_tests/service_tests.dart' as service_tests; | |
36 | |
37 import '../servicec/servicec_tests.dart' as servicec_tests; | |
38 | |
39 import '../fletchc/run.dart' as run; | |
40 | |
41 import '../fletchc/driver/test_vm_connection.dart' as test_vm_connection; | |
42 | |
43 import '../debugger/debugger_tests.dart' as debugger_tests; | |
44 | |
45 import '../flash_sd_card_tests/flash_sd_card_tests.dart' as flash_sd_card_tests; | |
46 | |
47 import '../mbedtls_tests/ssl_tests.dart' as ssl_tests; | |
48 | |
49 import '../../pkg/sdk_services/test/service_tests.dart' as sdk_service_tests; | |
50 | |
51 import '../mdns_tests/mdns_tests.dart' as mdns_tests; | |
52 | |
53 import '../power_management_tests/power_management_tests.dart' | |
54 as power_management_tests; | |
55 | |
56 import '../agent_tests/agent_tests.dart' as agent_tests; | |
57 | |
58 import '../golem/golem_tests.dart' as golem_tests; | |
59 | |
60 import '../version_tests/version_tests.dart' as version_tests; | |
61 | |
62 import '../cli_tests/cli_tests.dart' as cli_tests; | |
63 | |
64 typedef Future NoArgFuture(); | |
65 | |
66 /// Map of names to tests or collections of tests. | |
67 /// | |
68 /// Regarding the entries of this map: | |
69 /// | |
70 /// If the key does NOT end with '/*', it is considered a normal test case, and | |
71 /// the value is a closure that returns a future that completes as the test | |
72 /// completes. If the test fails, it should complete with an error. | |
73 /// | |
74 /// Otherwise, if the key DOES end with '/*', it is considered a collection of | |
75 /// tests, and the value must be a closure that returns a `Future<Map<String, | |
76 /// NoArgFuture>>` consting of only normal test cases. | |
77 const Map<String, NoArgFuture> TESTS = const <String, NoArgFuture>{ | |
78 'self/testSleepForThreeSeconds': self.testSleepForThreeSeconds, | |
79 'self/testAlwaysFails': self.testAlwaysFails, | |
80 'self/testNeverCompletes': self.testNeverCompletes, | |
81 'self/testMessages': self.testMessages, | |
82 'self/testPrint': self.testPrint, | |
83 | |
84 'verbs/helpTextFormat': verbs.testHelpTextFormatCompliance, | |
85 | |
86 // Slow tests, should run early so we don't wait for them. | |
87 'service_tests/*': service_tests.listTests, | |
88 | |
89 // Slow tests, should run early so we don't wait for them | |
90 'servicec/*': servicec_tests.listTests, | |
91 | |
92 // Slow tests, should run early so we don't wait for them. | |
93 'incremental/production/*': incremental_production.list, | |
94 'incremental/experimental/*': incremental_experimental.list, | |
95 | |
96 // Slow tests, should run early so we don't wait for them. | |
97 'debugger/*': debugger_tests.listTests, | |
98 | |
99 // Slow tests, should run early so we don't wait for them. | |
100 'agent_tests/*': agent_tests.listTests, | |
101 | |
102 // Slow tests, should run early so we don't wait for them. | |
103 'cli_tests/*': cli_tests.listTests, | |
104 | |
105 'snapshot_stacktrace_tests/*': snapshot_stacktrace_tests.listTests, | |
106 | |
107 'controlStream/testControlStream': controlStream.testControlStream, | |
108 | |
109 'zone_helper/testEarlySyncError': zone_helper.testEarlySyncError, | |
110 'zone_helper/testEarlyAsyncError': zone_helper.testEarlyAsyncError, | |
111 'zone_helper/testLateError': zone_helper.testLateError, | |
112 'zone_helper/testUnhandledLateError': zone_helper.testUnhandledLateError, | |
113 'zone_helper/testAlwaysFails': zone_helper.testAlwaysFails, | |
114 'zone_helper/testCompileTimeError': zone_helper.testCompileTimeError, | |
115 | |
116 'sentence_tests': sentence_tests.main, | |
117 | |
118 'message_tests': message_tests.main, | |
119 | |
120 'multiprogram_tests/*': multiprogram_tests.listTests, | |
121 | |
122 'serialize_settings_tests': serialize_settings_tests.main, | |
123 | |
124 'run/application_test': run.test, | |
125 'run/incremental_debug_info': run.testIncrementalDebugInfo, | |
126 | |
127 'test_vm_connection/test': test_vm_connection.test, | |
128 'test_vm_connection/testCloseImmediately': | |
129 test_vm_connection.testCloseImmediately, | |
130 'test_vm_connection/testCloseAfterCommitChanges': | |
131 test_vm_connection.testCloseAfterCommitChanges, | |
132 'test_vm_connection/testCloseAfterProcessRun': | |
133 test_vm_connection.testCloseAfterProcessRun, | |
134 | |
135 'flash_sd_card_tests/*': flash_sd_card_tests.listTests, | |
136 | |
137 'ssl_tests/ssl_tests': ssl_tests.main, | |
138 | |
139 'sdk_service_tests/sdk_service_tests': sdk_service_tests.main, | |
140 | |
141 // Test the mDNS package. | |
142 // TODO(sgjesse): publish the mDNS package as an ordinary package and pull | |
143 // it in through third_party. | |
144 'mdns_tests/*': mdns_tests.listTests, | |
145 | |
146 // Test the power management package. | |
147 // TODO(sgjesse): publish the power management package as an ordinary | |
148 // package and pull it in through third_party. | |
149 'power_management_tests/*': power_management_tests.listTests, | |
150 | |
151 // Test for the golem performance tracking infrastructure. | |
152 // If this test breaks you probably need to update the golem performance | |
153 // tracking infrastructure as well. | |
154 'golem_tests': golem_tests.main, | |
155 | |
156 'version_tests': version_tests.main, | |
157 }; | |
OLD | NEW |