dartist / dart-bignum

Other
14 stars 11 forks source link

Is the dart2js unittest environment working? #27

Open stevenroose opened 10 years ago

stevenroose commented 10 years ago

I'm trying to make changes to the BigInteger code. If I run the VM tests, they all pass.

I never used dart2js tests myself, but when I tried to execute the page.dart file, it launched Chromium and printed a page with a whole lot of hexdumps. The console displays this:

WARNING: This page is using a deprecated dart.js file. Please update this page as described here: http://news.dartlang.org/2013/01/big-breaking-change-dartjs-bootstrap-file-moving-to-pub.html (http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js:10)

Is the dart2js environment working correctly and do the tests pass if the black hexdumps are shown? Can I base myself solely on VM tests?

izaera commented 10 years ago

Can I base myself solely on VM tests?

From my experience you can't. At least in cipher I find compilation to JS very fragile. I would suggest that if you make changes you run the tests in cipher (or yours in dartcoin) in JS and if they don't break you can "assume" that you haven't broken anything (at least nothing which is used in cipher/dartcoin).

There's a big advantage with cryptography tests in the sense that they are very sensible to bugs in any underlying layer. Otherwise it wouldn't be cryptography ;-). So I guess it's the better way to test failures for bignum if no specific tests are available.