Merge pull request #807 from CJentzsch/addTests

included vmInputLimitTests, updated vmSystemOperationTests
This commit is contained in:
Gav Wood 2015-01-15 10:35:38 -05:00
commit 60379cabbc
2 changed files with 29 additions and 24 deletions

17
vm.cpp
View File

@ -508,23 +508,28 @@ BOOST_AUTO_TEST_CASE(vmLogTest)
dev::test::executeTests("vmLogTest", "/VMTests", dev::test::doVMTests); dev::test::executeTests("vmLogTest", "/VMTests", dev::test::doVMTests);
} }
BOOST_AUTO_TEST_CASE(vmPerformanceTest) BOOST_AUTO_TEST_CASE(vmSystemOperationsTest)
{
dev::test::executeTests("vmSystemOperationsTest", "/VMTests", dev::test::doVMTests);
}
BOOST_AUTO_TEST_CASE(vmInputLimitsTest1)
{ {
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
{ {
string arg = boost::unit_test::framework::master_test_suite().argv[i]; string arg = boost::unit_test::framework::master_test_suite().argv[i];
if (arg == "--performance") if (arg == "--inputlimits")
dev::test::executeTests("vmPerformanceTest", "/VMTests", dev::test::doVMTests); dev::test::executeTests("vmInputLimitsTest1", "/VMTests", dev::test::doVMTests);
} }
} }
BOOST_AUTO_TEST_CASE(vmArithPerformanceTest) BOOST_AUTO_TEST_CASE(vmInputLimitsTest2)
{ {
for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)
{ {
string arg = boost::unit_test::framework::master_test_suite().argv[i]; string arg = boost::unit_test::framework::master_test_suite().argv[i];
if (arg == "--performance") if (arg == "--inputlimits")
dev::test::executeTests("vmArithPerformanceTest", "/VMTests", dev::test::doVMTests); dev::test::executeTests("vmInputLimitsTest2", "/VMTests", dev::test::doVMTests);
} }
} }

View File

@ -12,7 +12,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000", "balance" : "1000000000000000000",
"nonce" : 0, "nonce" : 0,
"code" : "{ (MSTORE 0 0x601080600c6000396000f200600035560f6009590060203560003557) [[ 0 ]] (CREATE 23 4 28) }", "code" : "{ (MSTORE 0 0x601080600c6000396000f3006000355415600957005b60203560003555) [[ 0 ]] (CREATE 23 3 29) }",
"storage": {} "storage": {}
} }
}, },
@ -40,7 +40,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "100", "balance" : "100",
"nonce" : 0, "nonce" : 0,
"code" : "{ (MSTORE 0 0x601080600c6000396000f200600035560f6009590060203560003557) [[ 0 ]] (CREATE 230 4 28) }", "code" : "{ (MSTORE 0 0x601080600c6000396000f3006000355415600957005b60203560003555) [[ 0 ]] (CREATE 230 3 29) }",
"storage": {} "storage": {}
} }
}, },
@ -68,7 +68,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "100", "balance" : "100",
"nonce" : 0, "nonce" : 0,
"code" : "{ (MSTORE 0 0x601080600c6000396000f200600035560f6009590060203560003557) [[ 0 ]] (CREATE 23 0xfffffffffff 28) }", "code" : "{ (MSTORE 0 0x601080600c6000396000f3006000355415600957005b60203560003555) [[ 0 ]] (CREATE 23 0xfffffffffff 29) }",
"storage": {} "storage": {}
} }
}, },
@ -96,7 +96,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "100", "balance" : "100",
"nonce" : 0, "nonce" : 0,
"code" : "{ (MSTORE 0 0x601080600c6000396000f200600035560f6009590060203560003557) [[ 0 ]] (CREATE 23 4 0xffffffff) }", "code" : "{ (MSTORE 0 0x601080600c6000396000f3006000355415600957005b60203560003555) [[ 0 ]] (CREATE 23 3 0xffffffff) }",
"storage": {} "storage": {}
} }
}, },
@ -129,7 +129,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -340,7 +340,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -376,7 +376,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -412,7 +412,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -448,7 +448,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -485,7 +485,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -521,7 +521,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -675,7 +675,7 @@
}, },
"cd1722f3947def4cf144679da39c4c32bdc35681" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -711,7 +711,7 @@
}, },
"cd1722f3947def4cf144679da39c4c32bdc35681" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -747,7 +747,7 @@
}, },
"cd1722f3947def4cf144679da39c4c32bdc35681" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -873,7 +873,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -909,7 +909,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -945,7 +945,7 @@
}, },
"945304eb96065b2a98b57a48a06ae28d285a71b5" : { "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
"balance" : "23", "balance" : "23",
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"nonce" : "0", "nonce" : "0",
"storage" : { "storage" : {
} }
@ -976,7 +976,7 @@
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000", "balance" : "1000000000000000000",
"nonce" : 0, "nonce" : 0,
"code" : "0x600035560f600a59005d60203560003557", "code" : "0x6000355415600957005b60203560003555",
"storage": {} "storage": {}
} }
}, },