mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests bug fix.
This commit is contained in:
parent
e9057d221c
commit
b10e67213a
10
main.cpp
10
main.cpp
@ -42,11 +42,11 @@ int main(int, char**)
|
|||||||
std::cout << asHex(s.out()) << std::endl;
|
std::cout << asHex(s.out()) << std::endl;
|
||||||
std::cout << sha3(s.out()) << std::endl;*/
|
std::cout << sha3(s.out()) << std::endl;*/
|
||||||
|
|
||||||
// hexPrefixTest();
|
hexPrefixTest();
|
||||||
// rlpTest();
|
rlpTest();
|
||||||
// trieTest();
|
trieTest();
|
||||||
// daggerTest();
|
daggerTest();
|
||||||
// cryptoTest();
|
cryptoTest();
|
||||||
vmTest();
|
vmTest();
|
||||||
// stateTest();
|
// stateTest();
|
||||||
// peerTest(argc, argv);
|
// peerTest(argc, argv);
|
||||||
|
16
vm.cpp
16
vm.cpp
@ -269,22 +269,24 @@ public:
|
|||||||
Transactions txs;
|
Transactions txs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define CREATE_TESTS 0
|
||||||
|
|
||||||
template <> class UnitTest<1>
|
template <> class UnitTest<1>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int operator()()
|
int operator()()
|
||||||
{
|
{
|
||||||
json_spirit::mValue v;
|
json_spirit::mValue v;
|
||||||
string s = asString(contents("/home/gav/Projects/cpp-ethereum/test/vmtests.json"));
|
#if CREATE_TESTS
|
||||||
cout << s << endl;
|
string s = asString(contents("../../cpp-ethereum/test/vmtests.json"));
|
||||||
json_spirit::read_string(s, v);
|
json_spirit::read_string(s, v);
|
||||||
|
bool passed = doTests(v, true);
|
||||||
doTests(v, true);
|
|
||||||
|
|
||||||
cout << json_spirit::write_string(v, true) << endl;
|
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);
|
bool passed = doTests(v, false);
|
||||||
|
#endif
|
||||||
return passed ? 0 : 1;
|
return passed ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user