Getting tests to pass

0 views
Skip to first unread message

Peter Rust

unread,
Apr 30, 2010, 3:23:57 AM4/30/10
to js...@googlegroups.com

Jonathan, Niall, Ondrej,

 

I was able to spend a few hours this evening getting many of the tests to pass. Building spidermonkey from scratch on a windows box isn’t exactly a piece of cake – lots of prereqs and software to install, including Visual Studio.

 

Then it dawned on me that IE’s version of JavascriptJScript – can be run from the command-line on Windows and the output can be piped into a file. So I did that, realizing later that that gives us the added benefit of testing on both the Firefox and IE javascript engines.

 

One of the reasons all the tests were failing was that the original version stuffed any necessary JS functions into the output, while the new architecture has a standalone JS file. So I modified py2js_test.py to stuff the entire py-builtins.js into each of the test javascript files. However, it sure felt like this slowed things down considerably. If the performance becomes an issue (and I suspect it will), we’ll have to look at creative ways to load the js library or run the tests.

 

-- peter

 

 

 

PS: Here are the commit details:

 

jsbackend.py:

- added list() wrapper around list literals

 

jsmap.py:

- changed the mapping of .append to .append instead of .push

 

py-builtins.js

- removed check for pre-existing $import/$from globals b/c the call to 'window' broke in non-browser JS engines

- Added lists to py_builtins object so it is exposed

- Added splice, slice and pop methods to list object

- pulled string_formatting into py-builtins.js

 

py2js_test.py:

- Added a few lines to read in py-builtins.js and prepend it to every .js file

 

pyfrontend.py

- brought in Niall's fixes for Python 2.6 (decorators, ExceptHandler)

--
You received this message because you are subscribed to the Google Groups "JavaScript for Python programmers" group.
To post to this group, send an email to js...@googlegroups.com.
To unsubscribe from this group, send email to js4py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/js4py?hl=en-GB.
Reply all
Reply to author
Forward
0 new messages