OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library status_file_parser; | 5 library status_file_parser; |
6 | 6 |
7 import "dart:async"; | 7 import "dart:async"; |
8 import "dart:convert" show LineSplitter, UTF8; | 8 import "dart:convert" show LineSplitter, UTF8; |
9 import "dart:io"; | 9 import "dart:io"; |
10 | 10 |
11 import "path.dart"; | 11 import "path.dart"; |
12 import "status_expression.dart"; | 12 import "status_expression.dart"; |
13 | 13 |
14 class Expectation { | 14 class Expectation { |
15 // Possible outcomes of running a test. | 15 // Possible outcomes of running a test. |
16 static Expectation PASS = byName('Pass'); | 16 static Expectation PASS = byName('Pass'); |
17 static Expectation CRASH = byName('Crash'); | 17 static Expectation CRASH = byName('Crash'); |
18 static Expectation TIMEOUT = byName('Timeout'); | 18 static Expectation TIMEOUT = byName('Timeout'); |
19 static Expectation FAIL = byName('Fail'); | 19 static Expectation FAIL = byName('Fail'); |
20 | 20 |
21 // Special 'FAIL' cases | 21 // Special 'FAIL' cases |
22 static Expectation RUNTIME_ERROR = byName('RuntimeError'); | 22 static Expectation RUNTIME_ERROR = byName('RuntimeError'); |
23 static Expectation COMPILETIME_ERROR = byName('CompileTimeError'); | 23 static Expectation COMPILETIME_ERROR = byName('CompileTimeError'); |
24 static Expectation MISSING_RUNTIME_ERROR = byName('MissingRuntimeError'); | 24 static Expectation MISSING_RUNTIME_ERROR = byName('MissingRuntimeError'); |
25 static Expectation MISSING_COMPILETIME_ERROR = | 25 static Expectation MISSING_COMPILETIME_ERROR = |
26 byName('MissingCompileTimeError'); | 26 byName('MissingCompileTimeError'); |
27 static Expectation STATIC_WARNING = byName('StaticWarning'); | 27 static Expectation STATIC_WARNING = byName('StaticWarning'); |
28 static Expectation MISSING_STATIC_WARNING = byName('MissingStaticWarning'); | 28 static Expectation MISSING_STATIC_WARNING = byName('MissingStaticWarning'); |
29 static Expectation PUB_GET_ERROR = byName('PubGetError'); | 29 static Expectation PUB_GET_ERROR = byName('PubGetError'); |
30 static Expectation NON_UTF8_ERROR = byName('NonUtf8Output'); | |
31 | 30 |
32 // Special 'CRASH' cases | 31 // Special 'CRASH' cases |
33 static Expectation DARTK_CRASH = byName('DartkCrash'); | 32 static Expectation DARTK_CRASH = byName('DartkCrash'); |
34 | 33 |
35 // Special 'TIMEOUT' cases | 34 // Special 'TIMEOUT' cases |
36 static Expectation DARTK_TIMEOUT = byName('DartkTimeout'); | 35 static Expectation DARTK_TIMEOUT = byName('DartkTimeout'); |
37 | 36 |
38 // Special 'COMPILETIME_ERROR' | 37 // Special 'COMPILETIME_ERROR' |
39 static Expectation DARTK_COMPILETIME_ERROR = byName('DartkCompileTimeError'); | 38 static Expectation DARTK_COMPILETIME_ERROR = byName('DartkCompileTimeError'); |
40 | 39 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 73 |
75 var fail = build("Fail"); | 74 var fail = build("Fail"); |
76 var crash = build("Crash"); | 75 var crash = build("Crash"); |
77 var timeout = build("Timeout"); | 76 var timeout = build("Timeout"); |
78 build("Pass"); | 77 build("Pass"); |
79 | 78 |
80 var compileError = build("CompileTimeError", group: fail); | 79 var compileError = build("CompileTimeError", group: fail); |
81 build("MissingCompileTimeError", group: fail); | 80 build("MissingCompileTimeError", group: fail); |
82 build("MissingRuntimeError", group: fail); | 81 build("MissingRuntimeError", group: fail); |
83 build("RuntimeError", group: fail); | 82 build("RuntimeError", group: fail); |
84 build("NonUtf8Output", group: fail); | |
85 | 83 |
86 // Dartk sub expectations | 84 // Dartk sub expectations |
87 build("DartkCrash", group: crash); | 85 build("DartkCrash", group: crash); |
88 build("DartkTimeout", group: timeout); | 86 build("DartkTimeout", group: timeout); |
89 build("DartkCompileTimeError", group: compileError); | 87 build("DartkCompileTimeError", group: compileError); |
90 | 88 |
91 build("MissingStaticWarning", group: fail); | 89 build("MissingStaticWarning", group: fail); |
92 build("StaticWarning", group: fail); | 90 build("StaticWarning", group: fail); |
93 | 91 |
94 build("PubGetError", group: fail); | 92 build("PubGetError", group: fail); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 } | 353 } |
356 regExps[i] = regExp; | 354 regExps[i] = regExp; |
357 } | 355 } |
358 _keyToRegExps[key] = regExps; | 356 _keyToRegExps[key] = regExps; |
359 }); | 357 }); |
360 | 358 |
361 _regExpCache = null; | 359 _regExpCache = null; |
362 _preprocessed = true; | 360 _preprocessed = true; |
363 } | 361 } |
364 } | 362 } |
OLD | NEW |