kzc
3907a5e3b2
Fix warnings for referenced non-hoisted functions.
...
Fixes #1034
Also added `expect_warnings` functionality to test framework.
2016-04-11 18:15:20 +02:00
Anthony Van de Gejuchte
6605d15783
Never mangle arguments and keep them in their scope
...
Fixes #892
Helped-by: kzc
2016-01-14 19:45:52 +01:00
Anthony Van de Gejuchte
8c6af09ae0
Add mocha tests
2015-12-27 22:38:20 +01:00
Mihai Bazon
619adb0308
Replace util.error with console.log
2015-11-12 11:47:37 +02:00
Richard van Velzen
335e349314
Allow specification beautify options in tests
...
Caught an error in #847 as well - `output` wasn't passed anywhere which led to an exception. `options` was available though.
2015-10-28 20:50:01 +01:00
Fábio Santos
b5623b19d4
Fix #836
2015-10-20 19:48:56 +01:00
Mihai Bazon
1940fb682c
Fix tests
2015-10-12 10:27:00 +03:00
Richard van Velzen
759b3f7d6d
Fix mangling of property names which overwrite unmangleable properties
...
Fixes #747 .
2015-08-05 21:18:39 +02:00
Richard van Velzen
f8684f418a
Replace util.puts in run-tests with console.log
...
See d2dda34b2a
2015-07-29 15:24:45 +02:00
Fábio Santos
de58b0289d
Added expect_exact for testing the OutputStream
...
This works almost exactly like `expect`, except that you pass a literal string
of which the result is compared with the generated output.
2015-04-14 20:26:47 +02:00
Ingvar Stepanyan
b467a3c877
Added generative testing for AST conversions.
2014-08-03 20:48:59 +03:00
Mihai Bazon
582cc55cff
Display number of failed tests and corresponding files
2013-10-27 10:02:44 +02:00
Richard van Velzen
118105db43
Add an exit code to the test suite
...
By adding the exit code 1 (or any other non-zero exit code) `npm test`
will know the tests didn't perform correctly. This way it's easier to
know if pull requests are good or bad.
2013-10-23 20:24:58 +02:00
Mihai Bazon
afb7faa6fa
more optimizations for some break/continue cases
2012-10-18 15:14:57 +03:00
Mihai Bazon
1ffd526554
disable warnings in the test suite
2012-10-13 15:18:11 +03:00
Mihai Bazon
fcc0229087
drop unused function arguments
...
also add test for "drop_unused" (the last one fails for now)
2012-10-13 15:04:44 +03:00
Mihai Bazon
3412498795
AST cleanup (dropped AST_StatementBase)
2012-10-03 15:41:11 +03:00
Mihai Bazon
13278c6649
removed the "squeeze" method (it's now effectively "transform")
2012-09-26 19:52:32 +03:00
Mihai Bazon
4f97da9660
minor tests fix
2012-09-24 10:27:49 +03:00
Mihai Bazon
2b4093ba83
fixed run-tests and an issue about reversing the condition in AST_If
2012-09-12 13:00:13 +03:00
Mihai Bazon
43c75c9248
checkpoint
2012-09-07 18:55:13 +03:00
Mihai Bazon
919b2733ab
always keep declarations found in unreachable code
...
a few more tests and some cleanups.
2012-09-07 15:18:32 +03:00
Mihai Bazon
b77574ea1c
fixed tests (need to drop the toplevel block in "expected" if it's a single statement)
2012-09-07 11:22:01 +03:00
Mihai Bazon
d7c1dc6c05
a LabeledStatement should be in fact a StatementWithBody
...
This fixes output for:
if (foo) {
moo: if (bar) {
break moo;
}
} else {
baz();
}
(the labeled statement must be outputted inside brackets)
2012-09-03 12:05:10 +03:00
Mihai Bazon
8dfa9fe7e5
minor
2012-08-27 11:00:26 +03:00
Mihai Bazon
159a6f048c
wrote more of the compressor and added some tests
2012-08-22 15:21:58 +03:00