Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java

Issue 9969043: Adds Junit tests in dartc back into test.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Some Junit tests have broken in interleaving patches Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
index 57657715fb0ff688e082ed19345d2e28a4afee57..23b35adba6c976124b9d2137ee52f2a5230c402f 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.google.dart.compiler.resolver;
@@ -19,7 +19,6 @@ import com.google.dart.compiler.type.Type;
import java.util.ArrayList;
import java.util.List;
-// TODO(ngeoffray): Move these tests to the VM tests once we can run VM tests.
public class NegativeResolverTest extends CompilerTestCase {
List<DartCompilationError> errors = new ArrayList<DartCompilationError>();
@@ -31,6 +30,13 @@ public class NegativeResolverTest extends CompilerTestCase {
resolve(unit);
assertErrors(errors, expectedErrors);
}
+
+ public void checkSourceErrorsAsSystemLibrary(String source, ErrorExpectation... expectedErrors) {
+ DartUnit unit = parseUnitAsSystemLibrary("Test.dart", source);
+ resolve(unit);
+ assertErrors(errors, expectedErrors);
+ }
+
/**
* Parses given Dart file, runs {@link Resolver} and checks that expected errors were generated.
@@ -696,7 +702,7 @@ public class NegativeResolverTest extends CompilerTestCase {
}
public void test_nameShadow_field_nativeMethodParameter() {
- checkSourceErrors(makeCode(
+ checkSourceErrorsAsSystemLibrary(makeCode(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
" var a;",

Powered by Google App Engine
This is Rietveld 408576698