| 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 /// Messages used by fletch_test_suite.dart to communicate with test.py. | 5 /// Messages used by dartino_test_suite.dart to communicate with test.py. |
| 6 library fletch_tests.messages; | 6 library dartino_tests.messages; |
| 7 | 7 |
| 8 import 'dart:convert' show | 8 import 'dart:convert' show |
| 9 JSON; | 9 JSON; |
| 10 | 10 |
| 11 import 'dart:io' as io show stdout; | 11 import 'dart:io' as io show stdout; |
| 12 | 12 |
| 13 import 'dart:async' show | 13 import 'dart:async' show |
| 14 StreamTransformer; | 14 StreamTransformer; |
| 15 | 15 |
| 16 StreamTransformer<String, Message> get messageTransformer { | 16 StreamTransformer<String, Message> get messageTransformer { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 RunTest.fromJsonData(Map<String, dynamic> data) | 140 RunTest.fromJsonData(Map<String, dynamic> data) |
| 141 : super.fromJsonData(data); | 141 : super.fromJsonData(data); |
| 142 | 142 |
| 143 String get type => 'RunTest'; | 143 String get type => 'RunTest'; |
| 144 } | 144 } |
| 145 | 145 |
| 146 /// Notify that test [name] timed out. | 146 /// Notify that test [name] timed out. |
| 147 /// | 147 /// |
| 148 /// This message is bi-directional, it is used by test.dart to tell | 148 /// This message is bi-directional, it is used by test.dart to tell |
| 149 /// fletch_test_suite.dart that a test has timed out, as well as by | 149 /// dartino_test_suite.dart that a test has timed out, as well as by |
| 150 /// fletch_test_suite.dart to tell test.dart that the test did in fact time out | 150 /// dartino_test_suite.dart to tell test.dart that the test did in fact time out |
| 151 /// (due to interprocess communication, and lack of synchronization, it is | 151 /// (due to interprocess communication, and lack of synchronization, it is |
| 152 /// possible for a test to complete normally before it is terminated). | 152 /// possible for a test to complete normally before it is terminated). |
| 153 class TimedOut extends NamedMessage { | 153 class TimedOut extends NamedMessage { |
| 154 const TimedOut(String name) | 154 const TimedOut(String name) |
| 155 : super(name); | 155 : super(name); |
| 156 | 156 |
| 157 TimedOut.fromJsonData(Map<String, dynamic> data) | 157 TimedOut.fromJsonData(Map<String, dynamic> data) |
| 158 : super.fromJsonData(data); | 158 : super.fromJsonData(data); |
| 159 | 159 |
| 160 String get type => 'TimedOut'; | 160 String get type => 'TimedOut'; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 String get type => 'TestStdoutLine'; | 225 String get type => 'TestStdoutLine'; |
| 226 | 226 |
| 227 Map<String, dynamic> toJson() { | 227 Map<String, dynamic> toJson() { |
| 228 Map<String, dynamic> result = super.toJson(); | 228 Map<String, dynamic> result = super.toJson(); |
| 229 result['line'] = line; | 229 result['line'] = line; |
| 230 return result; | 230 return result; |
| 231 } | 231 } |
| 232 | 232 |
| 233 String toString() => "$type($name, $line)"; | 233 String toString() => "$type($name, $line)"; |
| 234 } | 234 } |
| OLD | NEW |