Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit fb921c2

Browse files
Dimitry Khgumb0
authored andcommitted
adress Andrey's comments
1 parent 22e7fc0 commit fb921c2

4 files changed

Lines changed: 13 additions & 31 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
- Added: [#5699](https://github.com/ethereum/aleth/pull/5699) EIP 2046: Reduced gas cost for static calls made to precompiles.
66
- Added: [#5752](https://github.com/ethereum/aleth/pull/5752) [#5753](https://github.com/ethereum/aleth/pull/5753) Implement EIP1380 (reduced gas costs for call-to-self).
7-
- Removed: [#5760](https://github.com/ethereum/aleth/pull/5760) Official support for Visual Studio 2015 has been dropped. Compilation with this compiler is expected to stop working after migration to C++14.
7+
- Changed: [#5801](https://github.com/ethereum/aleth/pull/5801) `testeth -t BlockchainTests` command now doesn't run the tests for the forks before Istanbul. To run those tests use a separate LegacyTests suite with command `testeth -t LegacyTests/Constantinople/BlockchainTests`.
8+
- Removed: [#5760](https://github.com/ethereum/aleth/pull/5760) Official support for Visual Studio 2015 has been dropped. Compilation with this compiler is expected to stop working after migration to C++14.
89
- Fixed: [#5792](https://github.com/ethereum/aleth/pull/5792) Faster and cheaper execution of RPC functions which query blockchain state (e.g. getBalance).
910

1011
## [1.7.0] - Unreleased

test/tools/jsontests/BlockChainTests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ class bcTransitionFixture {
10621062
BOOST_AUTO_TEST_SUITE(BlockchainTests)
10631063

10641064
// Tests that contain only valid blocks and check that import is correct
1065-
BOOST_FIXTURE_TEST_SUITE(ValidBlocks, bcValidTestFixture<test::BlockchainValidTestSuite>)
1065+
BOOST_FIXTURE_TEST_SUITE(ValidBlocks, bcTestFixture<test::BlockchainValidTestSuite>)
10661066
BOOST_AUTO_TEST_CASE(bcBlockGasLimitTest) {}
10671067
BOOST_AUTO_TEST_CASE(bcExploitTest) {}
10681068
BOOST_AUTO_TEST_CASE(bcForkStressTest) {}
@@ -1078,7 +1078,7 @@ BOOST_AUTO_TEST_CASE(bcWalletTest) {}
10781078
BOOST_AUTO_TEST_SUITE_END()
10791079

10801080
// Tests that might have invalid blocks and check that those are rejected
1081-
BOOST_FIXTURE_TEST_SUITE(InvalidBlocks, bcInvalidTestFixture<test::BlockchainInvalidTestSuite>)
1081+
BOOST_FIXTURE_TEST_SUITE(InvalidBlocks, bcTestFixture<test::BlockchainInvalidTestSuite>)
10821082
BOOST_AUTO_TEST_CASE(bcBlockGasLimitTest) {}
10831083
BOOST_AUTO_TEST_CASE(bcForgedTest) {}
10841084
BOOST_AUTO_TEST_CASE(bcInvalidHeaderTest) {}

test/tools/jsontests/BlockChainTests.h

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ class bcGeneralTestsFixture : public StateTestFixtureBase<BCGeneralStateTestsSui
4545
};
4646

4747
template <class T>
48-
class bcValidTestFixture
48+
class bcTestFixture
4949
{
5050
public:
51-
bcValidTestFixture(std::set<TestExecution> const& _execFlags = {})
51+
bcTestFixture(std::set<TestExecution> const& _execFlags = {})
5252
{
5353
T suite;
5454
if (_execFlags.count(TestExecution::NotRefillable) &&
5555
(Options::get().fillchain || Options::get().filltests))
5656
BOOST_FAIL("Tests are sealed and not refillable!");
5757

5858
string const casename = boost::unit_test::framework::current_test_case().p_name;
59-
boost::filesystem::path suiteFillerPath = suite.getFullPathFiller(casename).parent_path();
59+
boost::filesystem::path const suiteFillerPath = suite.getFullPathFiller(casename).parent_path();
6060

6161
// skip wallet test as it takes too much time (250 blocks) run it with --all flag
6262
if (casename == "bcWalletTest" && !test::Options::get().all)
@@ -71,25 +71,6 @@ class bcValidTestFixture
7171
}
7272
};
7373

74-
template <class T>
75-
class bcInvalidTestFixture
76-
{
77-
public:
78-
bcInvalidTestFixture(std::set<TestExecution> const& _execFlags = {})
79-
{
80-
T suite;
81-
if (_execFlags.count(TestExecution::NotRefillable) &&
82-
(Options::get().fillchain || Options::get().filltests))
83-
BOOST_FAIL("Tests are sealed and not refillable!");
84-
85-
string const casename = boost::unit_test::framework::current_test_case().p_name;
86-
boost::filesystem::path suiteFillerPath = suite.getFullPathFiller(casename).parent_path();
87-
88-
suite.runAllTestsInFolder(casename);
89-
test::TestOutputHelper::get().markTestFolderAsFinished(suiteFillerPath, casename);
90-
}
91-
};
92-
9374
class TransitionTestsSuite: public TestSuite
9475
{
9576
json_spirit::mValue doTests(json_spirit::mValue const& _input, bool _fillin) const override;

test/tools/jsontests/LegacyTests.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BCGeneralStateTestsSuiteLegacyConstantinople : public BCGeneralStateTestsS
3737
}
3838
};
3939

40-
class BlockchainInvalidTestSuiteLegacyConstantinople : public BlockchainInvalidTestSuite
40+
class LegacyConstantinopleBlockchainInvalidTestSuite : public BlockchainInvalidTestSuite
4141
{
4242
boost::filesystem::path suiteFolder() const override
4343
{
@@ -49,7 +49,7 @@ class BlockchainInvalidTestSuiteLegacyConstantinople : public BlockchainInvalidT
4949
}
5050
};
5151

52-
class BlockchainValidTestSuiteLegacyConstantinople : public BlockchainValidTestSuite
52+
class LegacyConstantinopleBlockchainValidTestSuite : public BlockchainValidTestSuite
5353
{
5454
boost::filesystem::path suiteFolder() const override
5555
{
@@ -81,19 +81,19 @@ class LegacyConstantinopleBCGeneralStateTestFixture
8181
};
8282

8383
class LegacyConstantinoplebcInvalidTestFixture
84-
: public bcInvalidTestFixture<BlockchainInvalidTestSuiteLegacyConstantinople>
84+
: public bcTestFixture<LegacyConstantinopleBlockchainInvalidTestSuite>
8585
{
8686
public:
8787
LegacyConstantinoplebcInvalidTestFixture()
88-
: bcInvalidTestFixture({TestExecution::NotRefillable})
88+
: bcTestFixture({TestExecution::NotRefillable})
8989
{}
9090
};
9191

9292
class LegacyConstantinoplebcValidTestFixture
93-
: public bcValidTestFixture<BlockchainValidTestSuiteLegacyConstantinople>
93+
: public bcTestFixture<LegacyConstantinopleBlockchainValidTestSuite>
9494
{
9595
public:
96-
LegacyConstantinoplebcValidTestFixture() : bcValidTestFixture({TestExecution::NotRefillable}) {}
96+
LegacyConstantinoplebcValidTestFixture() : bcTestFixture({TestExecution::NotRefillable}) {}
9797
};
9898

9999

0 commit comments

Comments
 (0)