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

Unified Diff: pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart

Issue 684863003: Issue 21333. Constant names are not special anymore in the style guide (Dart version). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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: pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
index 0971db24bdcb00a8bddc74cf3062a9858d41d038..6a1b53fb842912916c69e8de82fcbcf4c5a621b6 100644
--- a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
@@ -90,71 +90,6 @@ class NamingConventionsTest extends RefactoringTest {
RefactoringProblemSeverity.FATAL,
expectedMessage: "Class name must not start or end with a blank.");
}
- void test_validateConstantName_OK() {
- assertRefactoringStatusOK(validateConstantName("NAME"));
- }
-
- void test_validateConstantName_OK_digit() {
- assertRefactoringStatusOK(validateConstantName("NAME2"));
- }
-
- void test_validateConstantName_OK_underscoreLeading() {
- assertRefactoringStatusOK(validateConstantName("_NAME"));
- }
-
- void test_validateConstantName_OK_underscoreMiddle() {
- assertRefactoringStatusOK(validateConstantName("MY_NEW_NAME"));
- }
-
- void test_validateConstantName_empty() {
- assertRefactoringStatus(
- validateConstantName(""),
- RefactoringProblemSeverity.FATAL,
- expectedMessage: "Constant name must not be empty.");
- }
-
- void test_validateConstantName_leadingBlanks() {
- assertRefactoringStatus(
- validateConstantName(" NewName"),
- RefactoringProblemSeverity.FATAL,
- expectedMessage: "Constant name must not start or end with a blank.");
- }
-
- void test_validateConstantName_notAllCaps() {
- assertRefactoringStatus(
- validateConstantName("NewName"),
- RefactoringProblemSeverity.WARNING,
- expectedMessage: "Constant name should be all uppercase with underscores.");
- }
-
- void test_validateConstantName_notIdentifierMiddle() {
- assertRefactoringStatus(
- validateConstantName("NA-ME"),
- RefactoringProblemSeverity.FATAL,
- expectedMessage: "Constant name must not contain '-'.");
- }
-
- void test_validateConstantName_notIdentifierStart() {
- assertRefactoringStatus(
- validateConstantName("99_RED_BALLOONS"),
- RefactoringProblemSeverity.FATAL,
- expectedMessage:
- "Constant name must begin with an uppercase letter or underscore.");
- }
-
- void test_validateConstantName_null() {
- assertRefactoringStatus(
- validateConstantName(null),
- RefactoringProblemSeverity.FATAL,
- expectedMessage: "Constant name must not be null.");
- }
-
- void test_validateConstantName_trailingBlanks() {
- assertRefactoringStatus(
- validateConstantName("NewName "),
- RefactoringProblemSeverity.FATAL,
- expectedMessage: "Constant name must not start or end with a blank.");
- }
void test_validateConstructorName_OK() {
assertRefactoringStatusOK(validateConstructorName("newName"));

Powered by Google App Engine
This is Rietveld 408576698