Browse Source

Tests bug fix.

cl-refactor
Gav Wood 11 years ago
parent
commit
d145fdb971
  1. 4
      TODO
  2. 10
      test/main.cpp
  3. 16
      test/vm.cpp

4
TODO

@ -9,6 +9,7 @@ Crypto stuff:
Network:
- *** Exponential backoff on bad connection.
- *** Handle exception when no network.
- NotInChain will be very bad for new peers - it'll run through until the genesis.
- Check how many it has first.
- Crypto on network - use id as public key?
@ -27,9 +28,6 @@ THREAD-SAFETY
- TransactionQueue
- State
CLI client
- Implement CLI option "--help".
General:
- Better logging.
- Colours.

10
test/main.cpp

@ -42,11 +42,11 @@ int main(int, char**)
std::cout << asHex(s.out()) << std::endl;
std::cout << sha3(s.out()) << std::endl;*/
// hexPrefixTest();
// rlpTest();
// trieTest();
// daggerTest();
// cryptoTest();
hexPrefixTest();
rlpTest();
trieTest();
daggerTest();
cryptoTest();
vmTest();
// stateTest();
// peerTest(argc, argv);

16
test/vm.cpp

@ -269,22 +269,24 @@ public:
Transactions txs;
};
#define CREATE_TESTS 0
template <> class UnitTest<1>
{
public:
int operator()()
{
json_spirit::mValue v;
string s = asString(contents("/home/gav/Projects/cpp-ethereum/test/vmtests.json"));
cout << s << endl;
#if CREATE_TESTS
string s = asString(contents("../../cpp-ethereum/test/vmtests.json"));
json_spirit::read_string(s, v);
doTests(v, true);
bool passed = doTests(v, true);
cout << json_spirit::write_string(v, true) << endl;
#else
string s = asString(contents("../../tests/vmtests.json"));
json_spirit::read_string(s, v);
bool passed = doTests(v, false);
#endif
return passed ? 0 : 1;
}

Loading…
Cancel
Save