aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMisko Hevery2010-01-19 17:53:20 -0800
committerMisko Hevery2010-01-19 17:53:20 -0800
commitdb2031c5a1df205e6db40ca6aba80930375069c0 (patch)
treeba68d783f74007c307b1122ea0302f4dfc81e0b5 /test
parent910ddbe34eb6268e9049ca91211d43663d629879 (diff)
downloadangular.js-db2031c5a1df205e6db40ca6aba80930375069c0.tar.bz2
added debug info; fix parser bug with double negation
Diffstat (limited to 'test')
-rw-r--r--test/ParserTest.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ParserTest.js b/test/ParserTest.js
index 058010f3..fbd9f508 100644
--- a/test/ParserTest.js
+++ b/test/ParserTest.js
@@ -460,3 +460,11 @@ ParserTest.prototype.testReturnFunctionsAreNotBound = function(){
assertEquals("direct Group.all", "function", typeof Group.query);
};
+ParserTest.prototype.testDoubleNegationBug = function (){
+ var scope = new Scope();
+ assertEquals(true, scope.eval('true'));
+ assertEquals(false, scope.eval('!true'));
+ assertEquals(true, scope.eval('!!true'));
+ assertEquals('a', scope.eval('{true:"a", false:"b"}[!!true]'));
+};
+