1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 04:40:29 +02:00
Commit graph

6 commits

Author SHA1 Message Date
Ludovic Courtès
ed7c4a5d77 ecmascript: Fix conversion to boolean for non-numbers.
* module/language/ecmascript/base.scm (->boolean): Call `zero?' and
  `nan?' only when X is a number.
* test-suite/tests/ecmascript.test ("compiler"): Add test case.
2013-01-26 19:18:31 +01:00
Ludovic Courtès
90cfcf8fa7 Add ECMAScript parser tests.
* test-suite/tests/ecmascript.test ("parser"): Add parser tests for the
  previous fixes.
2011-01-26 23:47:31 +01:00
Noah Lavine
b1846b7fb3 Add ECMAScript Unicode literal support
* module/language/ecmascript/tokenize.scm: add unicode literals

* test-suite/tests/ecmascript.test ("parser"): Add new tests for Latin-1
  and Unicode escapes in string literals.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2011-01-17 23:03:32 +01:00
Noah Lavine
8891bd1b16 Fix ECMAScript object creation.
* module/language/ecmascript/compile-tree-il.scm (compile-tree-il):
  generate correct tree-il for construction of new objects.
* test-suite/tests/ecmascript.test (ecompile): Add pattern with EXPECTED
  omitted.
  ("compiler"): test whether we generate new objects correctly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2011-01-04 18:36:58 +01:00
Andy Wingo
e92f113a5e more ecmascript testing
* test-suite/tests/ecmascript.test (eread/1, parse): Also check
  read-ecmascript/1, which uses tokenize/1.
2010-11-18 12:26:20 +01:00
Ludovic Courtès
bd7131d3ad Add rudimentary ECMAScript tests.
* test-suite/Makefile.am (SCM_TESTS): Add `tests/ecmascript.test'.

* test-suite/tests/ecmascript.test: New file.
2010-03-31 00:42:01 +02:00