Commit Graph

110 Commits

Author SHA1 Message Date
wltsmrz
1fa196037e Fix direct requirements for tests 2013-11-18 13:08:05 -08:00
wltsmrz
9b3bb77d0e Merge pull request #27 from stevenzeiler/develop
[TEST] Add chai and sinon for testing, begin testing remote.js
2013-11-13 18:35:17 -08:00
Stefan Thomas
05f3a97042 UInt160 can be an account or a plain hash.
The UInt160 class used to be hardcoded to be an Account. This commit changes it
so it can be used as an account or a plain hash. It will try to automatically
self-classify based on how it is initialized.

In the future we may want to have some dedicated classes rather than a
single configurable UInt160.
2013-11-12 15:51:50 -08:00
Steven Zeiler
1db2187e79 [TEST] Add chai and sinon for testing.
Begin testing remote.js
    Add initialization of 'note variable' and a comment that it should be removed
2013-11-12 14:13:15 -08:00
Stefan Thomas
96ed994932 Fixes on XRP path serialization/deserialization. 2013-11-11 12:17:09 -08:00
Stefan Thomas
b2580ec178 Disambiguate PathSets with XRP vs XRP IOUs.
XRP IOUs are no longer valid, however they do exist in the network's historical
transactions, so the serialization and deserialization need to be able to handle
them.
2013-11-11 11:49:52 -08:00
Stefan Thomas
34ea528ade Add serialization of XRP as an IOU if explicitly asked for.
Unfortunately, there are some transactions in the history that use this format,
so we need to support it in order to be able to verify historic ledgers.
2013-11-08 16:36:37 -08:00
Stefan Thomas
a8759f1390 Fix large 32-bit integers getting deserialized as signed ints. 2013-11-08 14:21:27 -08:00
Stefan Thomas
069852a501 Fix parsing Hash256s that start with FF. 2013-11-08 12:49:13 -08:00
Stefan Thomas
5def7ba917 Add SHAMaps, metadata serialization and transaction hash calculation. 2013-11-07 22:36:06 -08:00
Stefan Thomas
74ef8f8400 Fix Int64 parsing. 2013-11-07 21:56:26 -08:00
Stefan Thomas
e65f975e29 Transaction#hash. 2013-11-07 13:56:07 -08:00
Stefan Thomas
f259c7ebd7 Montgomery: Fix infinite loop for leading zero inputs. Add test. 2013-09-21 17:16:44 -07:00
Stefan Thomas
5c36be59e5 More tests for Montgomery exponentiation. 2013-09-21 16:49:09 -07:00
Stefan Thomas
d2559dcdb8 Added Montgomery exponentiation for SJCL. 2013-09-21 15:23:55 -07:00
Stefan Thomas
6194d9bcd9 Left a console statement. Oops. 2013-09-21 05:50:28 -07:00
Stefan Thomas
64df821b38 JSBN and coverage tests cleanup.
Fixes compiler warning about SJCL.
Fixes coverage source highlighting issue.
Move JSBN outside of src/js/jsbn/.
2013-09-21 05:41:19 -07:00
Stefan Thomas
0986b37267 Added Jacobi functionality, more bn features - plus tests. 2013-09-19 22:24:49 -07:00
wltsmrz
8dd1b62d78 Improve test coverage 2013-09-12 14:15:44 -07:00
wltsmrz
9eeb3faba3 Improve test coverage 2013-09-12 14:15:34 -07:00
wltsmrz
bba2e10e94 Test coverage 2013-09-11 14:22:47 -07:00
jatchili
bcaabd36be Merge branch 'develop' of https://github.com/ripple/ripple-lib into develop
Conflicts:
	src/js/ripple/serializedtypes.js
	test/serializedtypes-test.js

JSONify complex structures before comparing them in tests.
2013-09-10 16:46:53 -07:00
jatchili
21aed214a7 messing around with serialized types test 2013-09-10 16:10:49 -07:00
wltsmrz
6f9c103d78 Update tests for future test coverage 2013-09-10 15:48:57 -07:00
wltsmrz
6ce83107c8 Cleanup 2013-09-09 13:05:40 -07:00
wltsmrz
bf95285d90 Use assert.deepEqual, fix serializedtypes 2013-09-08 18:07:55 -07:00
wltsmrz
8b1407613a Remove extraneous file 2013-09-08 17:38:02 -07:00
wltsmrz
25401bd08d Update ripple-lib tests to use mocha 2013-09-08 17:33:08 -07:00
jatchili
0c18f6157d SerializedObject to_json method, and a simple test for that. Tests are still preliminary, and refactoring is still necessary. 2013-08-14 18:33:01 -07:00
jatchili
63038d3603 basic tests for serializedtypes.js 2013-08-12 15:19:04 -07:00
Stefan Thomas
78b1e4f570 More work on new serialization/parsing functions. Added more tests. 2013-07-30 22:48:07 -07:00
Stefan Thomas
815e2af3cf Fix code indentation. 2013-07-30 21:32:28 -07:00
jatchili
5bc1603f43 begin testing serialization/parsing functions 2013-07-30 20:02:30 -07:00
Stefan Thomas
be2d647d48 Testutils is not used in this testsuite. 2013-07-27 19:46:32 -07:00
Stefan Thomas
6bb9f9e5e4 Implement Remote#reserve(). 2013-07-26 13:02:26 -07:00
wltsmrz
45a3ac3f66 Fallback to config-example for tests 2013-06-11 08:27:31 +09:00
Arthur Britto
b0c8d67d27 Fixed adding negative to zero. Fixes #6. 2013-05-30 23:59:58 -07:00
Stefan Thomas
22a954deed Changed directory structure to be more like server's. src/js/*.js -> src/js/ripple/ 2013-05-06 21:32:25 +02:00
Arthur Britto
d37f0b9082 Fix currency from integer. 2013-04-26 15:38:04 -07:00
Stefan Thomas
0813e312d6 New test suite name. See #1. 2013-04-26 10:05:18 +02:00
Arthur Britto
1ed5d6b3e5 JS: Fixes and improvements for Amount.
- Add from_quality()
- Add parse_quality()
- Improve add.
- Better peformance for copyTo().
- Fix parse_issuer(), set_issuer(), & set_currency() not to modify sub
  object.
- Correctly set currency and issuer of XRP in parse_json().
- Make not_equals_why more explicit.
2013-04-26 09:01:44 +02:00
Arthur Britto
5756cf277c Add trust auto clear. Fixes #28 2013-04-26 09:00:23 +02:00
Arthur Britto
b438bba775 UT: Fix server stopping. 2013-04-26 09:00:23 +02:00
Arthur Britto
af0c3bf517 UT: Verify quality setting. 2013-04-26 09:00:23 +02:00
Arthur Britto
85fdbac840 UT: Revise for new request_ripple_balance. 2013-04-26 09:00:23 +02:00
Arthur Britto
f5047521ce JS: Rename ADDRESS_ to ACCOUNT_ to be consistent with C++. 2013-04-26 09:00:22 +02:00
Stefan Thomas
ef7ef4ae9d JS: Fix erroneous base58 decoding and add tests for issue. 2013-04-26 09:00:21 +02:00
Stefan Thomas
4eb29890c0 JS: More tests for equals. 2013-04-26 09:00:21 +02:00
Stefan Thomas
4f09337aea JS: Add a way for the test suite to change Amount#equals, so it ignores issuers. 2013-04-26 09:00:21 +02:00
Stefan Thomas
0a13875c53 JS: More tests for Amount#equals and Amount#not_equals_why. 2013-04-26 09:00:21 +02:00