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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/scanner/AbstractScannerTest.java

Issue 17601008: Report ILLEGAL_CHARACTER for not 'a'-'z' and 'A'-'Z' letters in identifiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't allow invalid letters in the middle of identifiers. Created 7 years, 6 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/scanner/AbstractScannerTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/scanner/AbstractScannerTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/scanner/AbstractScannerTest.java
index 687dcb9338ae593e600ecc5a4032cbedfdb6b9d5..975d3c33c557fb67590abadacb4492dc7a21ebb6 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/scanner/AbstractScannerTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/scanner/AbstractScannerTest.java
@@ -229,7 +229,15 @@ public abstract class AbstractScannerTest extends TestCase {
assertToken(TokenType.IDENTIFIER, "result");
}
- public void test_illegalChar() throws Exception {
+ public void test_illegalChar_cyrillicLetter_middle() throws Exception {
+ assertError(ScannerErrorCode.ILLEGAL_CHARACTER, 0, "Shche\u0433lov");
+ }
+
+ public void test_illegalChar_cyrillicLetter_start() throws Exception {
+ assertError(ScannerErrorCode.ILLEGAL_CHARACTER, 0, "\u0429");
+ }
+
+ public void test_illegalChar_notLetter() throws Exception {
assertError(ScannerErrorCode.ILLEGAL_CHARACTER, 0, "\u0312");
}

Powered by Google App Engine
This is Rietveld 408576698