mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into develop_060
This commit is contained in:
@@ -37,7 +37,7 @@ class EWasmTranslationTest: public dev::solidity::test::EVMVersionRestrictedTest
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _config)
|
||||
{
|
||||
return std::unique_ptr<TestCase>(new EWasmTranslationTest(_config.filename));
|
||||
return std::make_unique<EWasmTranslationTest>(_config.filename);
|
||||
}
|
||||
|
||||
explicit EWasmTranslationTest(std::string const& _filename);
|
||||
|
||||
@@ -34,7 +34,7 @@ class FunctionSideEffects: public dev::solidity::test::TestCase
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _config)
|
||||
{ return std::unique_ptr<TestCase>(new FunctionSideEffects(_config.filename)); }
|
||||
{ return std::make_unique<FunctionSideEffects>(_config.filename); }
|
||||
explicit FunctionSideEffects(std::string const& _filename);
|
||||
|
||||
TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool const _formatted = false) override;
|
||||
|
||||
@@ -42,7 +42,7 @@ class ObjectCompilerTest: public dev::solidity::test::TestCase
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _config)
|
||||
{
|
||||
return std::unique_ptr<TestCase>(new ObjectCompilerTest(_config.filename));
|
||||
return std::make_unique<ObjectCompilerTest>(_config.filename);
|
||||
}
|
||||
|
||||
explicit ObjectCompilerTest(std::string const& _filename);
|
||||
|
||||
@@ -42,7 +42,7 @@ class YulInterpreterTest: public dev::solidity::test::EVMVersionRestrictedTestCa
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _config)
|
||||
{
|
||||
return std::unique_ptr<TestCase>(new YulInterpreterTest(_config.filename));
|
||||
return std::make_unique<YulInterpreterTest>(_config.filename);
|
||||
}
|
||||
|
||||
explicit YulInterpreterTest(std::string const& _filename);
|
||||
|
||||
@@ -424,7 +424,11 @@ void YulOptimizerTest::disambiguate()
|
||||
void YulOptimizerTest::updateContext()
|
||||
{
|
||||
m_nameDispenser = make_unique<NameDispenser>(*m_dialect, *m_ast, m_reservedIdentifiers);
|
||||
m_context = unique_ptr<OptimiserStepContext>(new OptimiserStepContext{*m_dialect, *m_nameDispenser, m_reservedIdentifiers});
|
||||
m_context = make_unique<OptimiserStepContext>(OptimiserStepContext{
|
||||
*m_dialect,
|
||||
*m_nameDispenser,
|
||||
m_reservedIdentifiers
|
||||
});
|
||||
}
|
||||
|
||||
void YulOptimizerTest::printErrors(ostream& _stream, ErrorList const& _errors)
|
||||
|
||||
@@ -51,7 +51,7 @@ class YulOptimizerTest: public dev::solidity::test::EVMVersionRestrictedTestCase
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _config)
|
||||
{
|
||||
return std::unique_ptr<TestCase>(new YulOptimizerTest(_config.filename));
|
||||
return std::make_unique<YulOptimizerTest>(_config.filename);
|
||||
}
|
||||
|
||||
explicit YulOptimizerTest(std::string const& _filename);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
let x := 0
|
||||
switch mload(x)
|
||||
case 0 { x := x }
|
||||
case 1 { x := 1 }
|
||||
default { invalid() }
|
||||
mstore(1, 1)
|
||||
}
|
||||
// ====
|
||||
// step: fullSuite
|
||||
// ----
|
||||
// {
|
||||
// {
|
||||
// switch mload(0)
|
||||
// case 0 { }
|
||||
// case 1 { }
|
||||
// default { invalid() }
|
||||
// mstore(1, 1)
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user