| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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 library test.fletch_warnings_suite; | 5 library test.fletch_warnings_suite; |
| 6 | 6 |
| 7 import 'dart:io' as io; | 7 import 'dart:io' as io; |
| 8 | 8 |
| 9 import 'dart:convert' show | 9 import 'dart:convert' show |
| 10 UTF8; | 10 UTF8; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 commandBuilder.getAnalysisCommand( | 55 commandBuilder.getAnalysisCommand( |
| 56 'dart2js-analyze-only', | 56 'dart2js-analyze-only', |
| 57 dartBinary, | 57 dartBinary, |
| 58 <String>[ | 58 <String>[ |
| 59 '--packages=.packages', // For the VM. | 59 '--packages=.packages', // For the VM. |
| 60 './third_party/dart/pkg/compiler/lib/src/dart2js.dart', | 60 './third_party/dart/pkg/compiler/lib/src/dart2js.dart', |
| 61 '--packages=.packages', // For dart2js. | 61 '--packages=.packages', // For dart2js. |
| 62 '--library-root=third_party/dart/sdk/', | 62 '--library-root=third_party/dart/sdk/', |
| 63 '--analyze-only', | 63 '--analyze-only', |
| 64 '--show-package-warnings', | 64 '--show-package-warnings', |
| 65 '--categories=Server']..addAll(arguments), | 65 '--categories=Server', |
| 66 '--allow-native-extensions']..addAll(arguments), |
| 66 null, | 67 null, |
| 67 flavor: 'dart2js')]; | 68 flavor: 'dart2js')]; |
| 68 } | 69 } |
| 69 } | 70 } |
| 70 | 71 |
| 71 class FletchWarningsSuite extends TestSuite { | 72 class FletchWarningsSuite extends TestSuite { |
| 72 FletchWarningsSuite(Map configuration, testSuiteDir) | 73 FletchWarningsSuite(Map configuration, testSuiteDir) |
| 73 : super(configuration, "warnings"); | 74 : super(configuration, "warnings"); |
| 74 | 75 |
| 75 void forEachTest( | 76 void forEachTest( |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 128 |
| 128 var filteredStdout = | 129 var filteredStdout = |
| 129 UTF8.decode(stdout, allowMalformed: true).replaceAll(noLintFilter, ""); | 130 UTF8.decode(stdout, allowMalformed: true).replaceAll(noLintFilter, ""); |
| 130 if (filteredStdout.isNotEmpty) { | 131 if (filteredStdout.isNotEmpty) { |
| 131 return Expectation.STATIC_WARNING; | 132 return Expectation.STATIC_WARNING; |
| 132 } | 133 } |
| 133 | 134 |
| 134 return Expectation.PASS; | 135 return Expectation.PASS; |
| 135 } | 136 } |
| 136 } | 137 } |
| OLD | NEW |