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

Unified Diff: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java

Issue 11293018: Update semantic highlighting only if there are no parse errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/parser/SyntaxTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
index 7bf53403aaa6d3d2f2cca61d0ff24333ce074e68..f977713fa14adbe3192780cfc40dc772f893b206 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -55,6 +55,16 @@ public class SyntaxTest extends AbstractParserTest {
"export 'a.dart';"));
}
+ public void test_hasParseErrors_true() {
+ DartUnit unit = parseSource("garbage").getDartUnit();
+ assertTrue(unit.hasParseErrors());
+ }
+
+ public void test_hasParseErrors_false() {
+ DartUnit unit = parseSource("// empty").getDartUnit();
+ assertFalse(unit.hasParseErrors());
+ }
+
public void test_importDirective_noUri() {
DartUnit unit = parseUnit("test.dart", Joiner.on("\n").join(
"library lib;",

Powered by Google App Engine
This is Rietveld 408576698