Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 package com.google.dart.corelib; | 5 package com.google.dart.corelib; |
| 6 | 6 |
| 7 import com.google.dart.compiler.CommandLineOptions.CompilerOptions; | 7 import com.google.dart.compiler.CommandLineOptions.CompilerOptions; |
| 8 import com.google.dart.compiler.CompilerConfiguration; | 8 import com.google.dart.compiler.CompilerConfiguration; |
| 9 import com.google.dart.compiler.DartArtifactProvider; | 9 import com.google.dart.compiler.DartArtifactProvider; |
| 10 import com.google.dart.compiler.DartCompilationError; | 10 import com.google.dart.compiler.DartCompilationError; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 272 } | 272 } |
| 273 } else { | 273 } else { |
| 274 if (!outcomes.contains("fail")) { | 274 if (!outcomes.contains("fail")) { |
| 275 fail(log + e.getLocalizedMessage()); | 275 fail(log + e.getLocalizedMessage()); |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 | 279 |
| 280 static Test getInstance(String line, boolean regularCompile) { | 280 static Test getInstance(String line, boolean regularCompile) { |
| 281 String[] fields = SEPARATOR.split(line); | 281 String[] fields = SEPARATOR.split(line); |
| 282 assertTrue(line, fields.length > 3); | 282 if (fields.length <= 3) { |
| 283 fail("SharedTestCase.java(284): Line is not parsable: " + line); | |
|
ahe
2012/02/03 11:57:36
No need to insert the filename and line number. Th
| |
| 284 } | |
| 283 String name = fields[0]; | 285 String name = fields[0]; |
| 284 Set<String> outcomes = new HashSet<String>(Arrays.<String>asList(fields[1].s plit(","))); | 286 Set<String> outcomes = new HashSet<String>(Arrays.<String>asList(fields[1].s plit(","))); |
| 285 boolean isNegative = fields[2].equals("True"); | 287 boolean isNegative = fields[2].equals("True"); |
| 286 String[] arguments = new String[fields.length - 3]; | 288 String[] arguments = new String[fields.length - 3]; |
| 287 System.arraycopy(fields, 3, arguments, 0, arguments.length); | 289 System.arraycopy(fields, 3, arguments, 0, arguments.length); |
| 288 return new SharedTestCase(name, outcomes, isNegative, regularCompile, argume nts) {}; | 290 return new SharedTestCase(name, outcomes, isNegative, regularCompile, argume nts) {}; |
| 289 } | 291 } |
| 290 } | 292 } |
| OLD | NEW |