minor tests fix

This commit is contained in:
Mihai Bazon
2012-09-24 10:27:49 +03:00
parent a83b28503f
commit 4f97da9660
2 changed files with 4 additions and 2 deletions

View File

@@ -84,6 +84,6 @@ make_sequences_4: {
for (x = 5, i = 0; i < 5; i++) console.log(i); for (x = 5, i = 0; i < 5; i++) console.log(i);
for (x = 5; i < 5; i++) console.log(i); for (x = 5; i < 5; i++) console.log(i);
switch (x = 5, y) {} switch (x = 5, y) {}
with (x = 5, obj) {} with (x = 5, obj);
} }
} }

View File

@@ -87,7 +87,9 @@ function run_compress_tests() {
function parse_test(file) { function parse_test(file) {
var script = fs.readFileSync(file, "utf8"); var script = fs.readFileSync(file, "utf8");
var ast = U.parse(script); var ast = U.parse(script, {
filename: file
});
var tests = {}; var tests = {};
var tw = new U.TreeWalker(function(node, descend){ var tw = new U.TreeWalker(function(node, descend){
if (node instanceof U.AST_LabeledStatement if (node instanceof U.AST_LabeledStatement