Skip to content

Commit b26d5fd

Browse files
committed
MemoryGuardTest: Respect EVM version selected on the command line
1 parent a4d54cc commit b26d5fd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/libsolidity/MemoryGuardTest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <test/libsolidity/MemoryGuardTest.h>
2020

21+
#include <test/Common.h>
2122
#include <test/libyul/Common.h>
2223
#include <libsolidity/codegen/ir/Common.h>
2324
#include <libsolutil/Algorithms.h>
@@ -35,6 +36,7 @@ using namespace solidity::util::formatting;
3536
using namespace solidity::langutil;
3637
using namespace solidity::frontend;
3738
using namespace solidity::frontend::test;
39+
using namespace solidity::test;
3840
using namespace yul;
3941

4042
void MemoryGuardTest::setupCompiler(CompilerStack& _compiler)
@@ -59,7 +61,7 @@ TestCase::TestResult MemoryGuardTest::run(std::ostream& _stream, std::string con
5961
ErrorList errors;
6062
auto [object, analysisInfo] = yul::test::parse(
6163
compiler().yulIR(contractName),
62-
EVMDialect::strictAssemblyForEVMObjects({}),
64+
EVMDialect::strictAssemblyForEVMObjects(CommonOptions::get().evmVersion()),
6365
errors
6466
);
6567

test/libsolidity/MemoryGuardTest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ namespace solidity::frontend::test
3434

3535
using solidity::test::SyntaxTestError;
3636

37-
class MemoryGuardTest: public AnalysisFramework, public TestCase
37+
class MemoryGuardTest: public AnalysisFramework, public EVMVersionRestrictedTestCase
3838
{
3939
public:
4040
static std::unique_ptr<TestCase> create(Config const& _config)
4141
{
4242
return std::make_unique<MemoryGuardTest>(_config.filename);
4343
}
44-
MemoryGuardTest(std::string const& _filename): TestCase(_filename)
44+
MemoryGuardTest(std::string const& _filename): EVMVersionRestrictedTestCase(_filename)
4545
{
4646
m_source = m_reader.source();
4747
m_expectation = m_reader.simpleExpectations();

0 commit comments

Comments
 (0)