2018-12-05 17:00:23 +00:00
|
|
|
/*
|
|
|
|
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/>.
|
|
|
|
*/
|
2020-07-17 14:54:12 +00:00
|
|
|
// SPDX-License-Identifier: GPL-3.0
|
2018-12-05 17:00:23 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <test/TestCase.h>
|
2019-07-02 15:30:54 +00:00
|
|
|
#include <test/libsolidity/ABIJsonTest.h>
|
2018-12-05 17:00:23 +00:00
|
|
|
#include <test/libsolidity/ASTJSONTest.h>
|
2023-05-29 08:58:48 +00:00
|
|
|
#include <test/libsolidity/ASTPropertyTest.h>
|
2019-05-06 16:55:10 +00:00
|
|
|
#include <test/libsolidity/GasTest.h>
|
2022-02-10 16:57:43 +00:00
|
|
|
#include <test/libsolidity/MemoryGuardTest.h>
|
2018-12-05 17:00:23 +00:00
|
|
|
#include <test/libsolidity/SyntaxTest.h>
|
2019-02-06 11:10:05 +00:00
|
|
|
#include <test/libsolidity/SemanticTest.h>
|
2019-12-03 15:50:28 +00:00
|
|
|
#include <test/libsolidity/SMTCheckerTest.h>
|
2021-06-11 17:17:41 +00:00
|
|
|
#include <test/libyul/ControlFlowGraphTest.h>
|
2021-03-09 13:53:10 +00:00
|
|
|
#include <test/libyul/EVMCodeTransformTest.h>
|
2018-12-05 17:00:23 +00:00
|
|
|
#include <test/libyul/YulOptimizerTest.h>
|
2018-02-08 17:20:54 +00:00
|
|
|
#include <test/libyul/YulInterpreterTest.h>
|
2018-12-05 17:00:23 +00:00
|
|
|
#include <test/libyul/ObjectCompilerTest.h>
|
2021-09-30 15:01:54 +00:00
|
|
|
#include <test/libyul/ControlFlowSideEffectsTest.h>
|
2019-08-14 16:07:15 +00:00
|
|
|
#include <test/libyul/FunctionSideEffects.h>
|
2021-07-05 16:13:44 +00:00
|
|
|
#include <test/libyul/StackLayoutGeneratorTest.h>
|
2023-04-25 10:07:44 +00:00
|
|
|
#include <test/libyul/StackShufflingTest.h>
|
2020-02-04 18:40:32 +00:00
|
|
|
#include <test/libyul/SyntaxTest.h>
|
2018-12-05 17:00:23 +00:00
|
|
|
|
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
|
2019-12-23 15:50:30 +00:00
|
|
|
namespace solidity::frontend::test
|
2018-12-05 17:00:23 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
/** Container for all information regarding a testsuite */
|
|
|
|
struct Testsuite
|
|
|
|
{
|
|
|
|
char const* title;
|
|
|
|
boost::filesystem::path const path;
|
|
|
|
boost::filesystem::path const subpath;
|
|
|
|
bool smt;
|
2019-07-17 08:24:23 +00:00
|
|
|
bool needsVM;
|
2018-12-05 17:00:23 +00:00
|
|
|
TestCase::TestCaseCreator testCaseCreator;
|
2020-07-10 09:22:57 +00:00
|
|
|
std::vector<std::string> labels{};
|
2018-12-05 17:00:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// Array of testsuits that can be run interactively as well as automatically
|
|
|
|
Testsuite const g_interactiveTestsuites[] = {
|
|
|
|
/*
|
2019-07-17 08:24:23 +00:00
|
|
|
Title Path Subpath SMT NeedsVM Creator function */
|
2021-06-11 17:17:41 +00:00
|
|
|
{"Yul Optimizer", "libyul", "yulOptimizerTests", false, false, &yul::test::YulOptimizerTest::create},
|
|
|
|
{"Yul Interpreter", "libyul", "yulInterpreterTests", false, false, &yul::test::YulInterpreterTest::create},
|
|
|
|
{"Yul Object Compiler", "libyul", "objectCompiler", false, false, &yul::test::ObjectCompilerTest::create},
|
|
|
|
{"Yul Control Flow Graph", "libyul", "yulControlFlowGraph", false, false, &yul::test::ControlFlowGraphTest::create},
|
2021-07-05 16:13:44 +00:00
|
|
|
{"Yul Stack Layout", "libyul", "yulStackLayout", false, false, &yul::test::StackLayoutGeneratorTest::create},
|
2023-04-25 10:07:44 +00:00
|
|
|
{"Yul Stack Shuffling", "libyul", "yulStackShuffling", false, false, &yul::test::StackShufflingTest::create},
|
2021-09-30 15:01:54 +00:00
|
|
|
{"Control Flow Side Effects","libyul", "controlFlowSideEffects",false, false, &yul::test::ControlFlowSideEffectsTest::create},
|
2021-06-11 17:17:41 +00:00
|
|
|
{"Function Side Effects", "libyul", "functionSideEffects", false, false, &yul::test::FunctionSideEffects::create},
|
|
|
|
{"Yul Syntax", "libyul", "yulSyntaxTests", false, false, &yul::test::SyntaxTest::create},
|
|
|
|
{"EVM Code Transform", "libyul", "evmCodeTransform", false, false, &yul::test::EVMCodeTransformTest::create, {"nooptions"}},
|
|
|
|
{"Syntax", "libsolidity", "syntaxTests", false, false, &SyntaxTest::create},
|
|
|
|
{"Semantic", "libsolidity", "semanticTests", false, true, &SemanticTest::create},
|
|
|
|
{"JSON AST", "libsolidity", "ASTJSON", false, false, &ASTJSONTest::create},
|
|
|
|
{"JSON ABI", "libsolidity", "ABIJson", false, false, &ABIJsonTest::create},
|
|
|
|
{"SMT Checker", "libsolidity", "smtCheckerTests", true, false, &SMTCheckerTest::create},
|
2021-09-30 15:01:54 +00:00
|
|
|
{"Gas Estimates", "libsolidity", "gasTests", false, false, &GasTest::create},
|
2023-05-29 08:58:48 +00:00
|
|
|
{"Memory Guard", "libsolidity", "memoryGuardTests", false, false, &MemoryGuardTest::create},
|
|
|
|
{"AST Properties", "libsolidity", "astPropertyTests", false, false, &ASTPropertyTest::create},
|
2018-12-05 17:00:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|