Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Additional minor fix for unit tests. It seems that eval wants to be a…

…n error, not a warning.
  • Loading branch information...
commit 4a8f21b30ada51131daf599655d127fdd9438ebf 1 parent d072970
@ingo ingo authored
View
18 tests/com.aptana.editor.js.tests/src/com/aptana/editor/js/validator/JSLintValidatorTest.java
@@ -2079,7 +2079,7 @@ public void testRadix() throws CoreException
public void testReadOnly() throws CoreException
{
Set<String> predefineds = CollectionsUtil.newSet("Array", "Boolean", "Date", "decodeURI", "decodeURIComponent",
- "encodeURI", "encodeURIComponent", "Error", "eval", "EvalError", "Function", "isFinite", "isNaN",
+ "encodeURI", "encodeURIComponent", "Error", "EvalError", "Function", "isFinite", "isNaN",
"JSON", "Math", "Number", "Object", "parseInt", "parseFloat", "RangeError", "ReferenceError", "RegExp",
"String", "SyntaxError", "TypeError", "URIError");
for (String predefined : predefineds)
@@ -2089,7 +2089,21 @@ public void testReadOnly() throws CoreException
// @formatter:on
List<IProblem> items = getParseErrors(text);
- assertProblemExists(items, "Read only.", 1, IMarker.SEVERITY_ERROR, "eval".equals(predefined) ? 7 : 0);
+ assertProblemExists(items, "Read only.", 1, IMarker.SEVERITY_WARNING, 0);
+ }
+ }
+
+ public void testReadOnlyEval() throws CoreException
+ {
+ Set<String> predefineds = CollectionsUtil.newSet("eval");
+ for (String predefined : predefineds)
+ {
+ // @formatter:off
+ String text = predefined + " = true;";
+ // @formatter:on
+
+ List<IProblem> items = getParseErrors(text);
+ assertProblemExists(items, "Read only.", 1, IMarker.SEVERITY_ERROR, 7);
}
}

0 comments on commit 4a8f21b

Please sign in to comment.
Something went wrong with that request. Please try again.