diff options
Diffstat (limited to 'js/src/tests/js1_8_5/reflect-parse/expressionClosures.js')
-rw-r--r-- | js/src/tests/js1_8_5/reflect-parse/expressionClosures.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/tests/js1_8_5/reflect-parse/expressionClosures.js b/js/src/tests/js1_8_5/reflect-parse/expressionClosures.js new file mode 100644 index 000000000..3f95a0d2a --- /dev/null +++ b/js/src/tests/js1_8_5/reflect-parse/expressionClosures.js @@ -0,0 +1,11 @@ +// |reftest| skip-if(!xulRuntime.shell) +function test() { + +// expression closures + +assertDecl("function inc(x) (x + 1)", funDecl(ident("inc"), [ident("x")], binExpr("+", ident("x"), lit(1)))); +assertExpr("(function(x) (x+1))", funExpr(null, [ident("x")], binExpr("+"), ident("x"), lit(1))); + +} + +runtest(test); |