[yul-phaser] Add a file for small utilities used in yul-phaser's tests

This commit is contained in:
Kamil Śliwak 2020-02-13 21:33:37 +01:00
parent 40b086774a
commit 94538efc0e
4 changed files with 79 additions and 0 deletions

View File

@ -139,6 +139,9 @@ set(libyul_sources
detect_stray_source_files("${libyul_sources}" "libyul/")
set(yul_phaser_sources
yulPhaser/Common.h
yulPhaser/Common.cpp
yulPhaser/CommonTest.cpp
yulPhaser/Chromosome.cpp
yulPhaser/Population.cpp
yulPhaser/Program.cpp

18
test/yulPhaser/Common.cpp Normal file
View File

@ -0,0 +1,18 @@
/*
This file is part of solidity.
solidity is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
solidity is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
#include <test/yulPhaser/Common.h>

29
test/yulPhaser/Common.h Normal file
View File

@ -0,0 +1,29 @@
/*
This file is part of solidity.
solidity is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
solidity is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Miscellaneous utilities for use in yul-phaser's test cases.
*
* - Generic code that's only used in these particular tests.
* - Convenience functions and wrappers to make tests more concise.
* - Mocks and dummy objects/functions used in multiple test suites.
*
* Note that the code included here may be not as generic, robust and/or complete as it could be
* since it's not meant for production use. If some utility seems useful enough to be moved to
* the normal code base, you should review its implementation before doing so.
*/
#pragma once

View File

@ -0,0 +1,29 @@
/*
This file is part of solidity.
solidity is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
solidity is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
#include <boost/test/unit_test.hpp>
namespace solidity::phaser::test
{
BOOST_AUTO_TEST_SUITE(Phaser)
BOOST_AUTO_TEST_SUITE(CommonTest)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()
}