aboutsummaryrefslogtreecommitdiffstats
path: root/test/ParserTest.js
diff options
context:
space:
mode:
authorMisko Hevery2010-02-12 14:16:33 -0800
committerMisko Hevery2010-02-12 14:17:44 -0800
commit6cc946413622f1cef97997849e73a06a00f876fd (patch)
treeb0e4e10405fc8cd91e6d55507b3a6a02528928a9 /test/ParserTest.js
parentb2a8a089b6c31c8ff176c2483f659caae4f71afb (diff)
downloadangular.js-6cc946413622f1cef97997849e73a06a00f876fd.tar.bz2
Fixed negation grouping bug
Make 'this' of validation be scope
Diffstat (limited to 'test/ParserTest.js')
-rw-r--r--test/ParserTest.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ParserTest.js b/test/ParserTest.js
index 2fcbc7fe..09c3b8de 100644
--- a/test/ParserTest.js
+++ b/test/ParserTest.js
@@ -160,6 +160,9 @@ ParserTest.prototype.testComparison = function(){
assertEquals(scope.eval("1<=1"), true);
assertEquals(scope.eval("1>2"), 1>2);
assertEquals(scope.eval("2>=1"), 2>=1);
+
+ assertEquals(true==2<3, scope.eval("true==2<3"));
+
};
ParserTest.prototype.testLogical = function(){
@@ -467,3 +470,10 @@ ParserTest.prototype.testDoubleNegationBug = function (){
assertEquals('a', scope.eval('{true:"a", false:"b"}[!!true]'));
};
+ParserTest.prototype.testNegationBug = function () {
+ var scope = new Scope();
+ assertEquals(!false || true, scope.eval("!false || true"));
+ assertEquals(!11 == 10, scope.eval("!11 == 10"));
+ assertEquals(12/6/2, scope.eval("12/6/2"));
+};
+