Browse Source

reorder tests

patch-2
Manuel Araoz 10 years ago
parent
commit
f0a4aebdfb
  1. 2
      index.js
  2. 6
      lib/crypto/ecdsa.js
  3. 6
      lib/crypto/kdf.js
  4. 2
      lib/transaction.js
  5. 0
      test/crypto/bn.js
  6. 0
      test/crypto/ecdsa.js
  7. 0
      test/crypto/hash.js
  8. 0
      test/crypto/kdf.js
  9. 0
      test/crypto/point.js
  10. 0
      test/crypto/random.js
  11. 0
      test/protocol/base58.js
  12. 0
      test/protocol/base58check.js
  13. 0
      test/protocol/bufferreader.js
  14. 0
      test/protocol/bufferwriter.js
  15. 18
      test/protocol/constants.js
  16. 0
      test/protocol/varint.js

2
index.js

@ -6,6 +6,7 @@ bitcore.Base58 = require('./lib/protocol/base58');
bitcore.Base58Check = require('./lib/protocol/base58check');
bitcore.BufferReader = require('./lib/protocol/bufferreader');
bitcore.BufferWriter = require('./lib/protocol/bufferwriter');
bitcore.Varint = require('./lib/protocol/varint');
// crypto
bitcore.BN = require('./lib/crypto/bn');
@ -29,7 +30,6 @@ bitcore.Signature = require('./lib/signature');
bitcore.Transaction = require('./lib/transaction');
bitcore.Txin = require('./lib/txin');
bitcore.Txout = require('./lib/txout');
bitcore.Varint = require('./lib/varint');
//dependencies, subject to change

6
lib/crypto/ecdsa.js

@ -2,10 +2,10 @@
var BN = require('./bn');
var Point = require('./point');
var Signature = require('./signature');
var Keypair = require('./keypair');
var Pubkey = require('./pubkey');
var Random = require('./random');
var Pubkey = require('../pubkey');
var Keypair = require('../keypair');
var Signature = require('../signature');
var ECDSA = function ECDSA(obj) {
if (!(this instanceof ECDSA))

6
lib/crypto/kdf.js

@ -1,13 +1,13 @@
'use strict';
var Bn = require('./bn');
var Privkey = require('./privkey');
var Point = require('./point');
var Keypair = require('./keypair');
var Hash = require('./hash');
var Privkey = require('../privkey');
var Keypair = require('../keypair');
function KDF() {
};
}
KDF.buf2keypair = function(buf) {
return KDF.sha256hmac2keypair(buf);

2
lib/transaction.js

@ -3,7 +3,7 @@
var BufferWriter = require('./protocol/bufferwriter');
var BufferReader = require('./protocol/bufferreader');
var Varint = require('./protocol/varint');
var Hash = require('./cryptohash');
var Hash = require('./crypto/hash');
var Txin = require('./txin');
var Txout = require('./txout');

0
test/bn.js → test/crypto/bn.js

0
test/ecdsa.js → test/crypto/ecdsa.js

0
test/hash.js → test/crypto/hash.js

0
test/kdf.js → test/crypto/kdf.js

0
test/point.js → test/crypto/point.js

0
test/random.js → test/crypto/random.js

0
test/base58.js → test/protocol/base58.js

0
test/base58check.js → test/protocol/base58check.js

0
test/bufferreader.js → test/protocol/bufferreader.js

0
test/bufferwriter.js → test/protocol/bufferwriter.js

18
test/protocol/constants.js

@ -0,0 +1,18 @@
'use strict';
var should = require('chai').should();
var bitcore = require('../../');
var constants = bitcore.Constants;
describe('Constants', function() {
it('should contain all constants for livenet and testnet', function() {
for (var key in constants.livenet) {
if (constants.livenet.hasOwnProperty(key)) {
constants.testnet.hasOwnProperty(key).should.equal(true);
}
}
});
});

0
test/varint.js → test/protocol/varint.js

Loading…
Cancel
Save