asm-js / validator

A reference validator for asm.js.
Apache License 2.0
1.78k stars 148 forks source link

Fixing asm.js node module #76

Closed padolsey closed 10 years ago

padolsey commented 10 years ago

Hi Dave,

If you're already working on this or there's something else in the pipeline, or if this pull request is generally off the mark, please disregard.


Currently main in package.json points to lib/asm.js which doesn't exist. I've created a lib/asm.js -- it just includes the basic stuff an asmjs-node-module consumer might want to access (at the moment: validate, types, ValidationError).

I also noticed the nodeunit tests were not succeeding so I've restored tables.js (which was missing [?]). Tests succeed now:

$ nodeunit tests/index.js

index
✔ testModuloIntish1
✔ testModuleIntish2
✔ testIntCoercionRequiresDouble1
✔ testIntCoercionRequiresDouble2
✔ testNot
✔ testParamTypes
✔ testAdd
✔ testImul
✔ testLoad
✔ testStore
✔ testCall1
✔ testCall2
✔ testVoid1
✔ testVoid2
✔ testEval1
✔ testEval2
✔ testEval3

Also changed tests/asm.js to asmAssert.js for clarity and to avoid ambiguity with the new lib/asm.js.

Please let me know if any further changes are required.

dherman commented 10 years ago

Thanks for the PR!

dherman commented 10 years ago

Published to npm as 0.0.2.