aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/InlineAssembly.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-07 19:01:43 +0800
committerchriseth <chris@ethereum.org>2018-11-27 22:59:57 +0800
commit728119bb110b68be3df80b827f73e1d4f36d6bc5 (patch)
tree236790839810e511d97349bddbd408c46dff1834 /test/libsolidity/InlineAssembly.cpp
parente016cb99e679c53708ca7294442e04f80df477cc (diff)
downloaddexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.tar
dexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.tar.gz
dexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.tar.bz2
dexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.tar.lz
dexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.tar.xz
dexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.tar.zst
dexon-solidity-728119bb110b68be3df80b827f73e1d4f36d6bc5.zip
Use yul parser in assembly stack.
Diffstat (limited to 'test/libsolidity/InlineAssembly.cpp')
-rw-r--r--test/libsolidity/InlineAssembly.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index 31d21490..11d4c59f 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -124,7 +124,8 @@ void parsePrintCompare(string const& _source, bool _canWarn = false)
BOOST_REQUIRE(Error::containsOnlyWarnings(stack.errors()));
else
BOOST_REQUIRE(stack.errors().empty());
- BOOST_CHECK_EQUAL(stack.print(), _source);
+ string expectation = "object \"object\" {\n code " + boost::replace_all_copy(_source, "\n", "\n ") + "\n}\n";
+ BOOST_CHECK_EQUAL(stack.print(), expectation);
}
}
@@ -567,12 +568,14 @@ BOOST_AUTO_TEST_CASE(print_string_literals)
BOOST_AUTO_TEST_CASE(print_string_literal_unicode)
{
string source = "{ let x := \"\\u1bac\" }";
- string parsed = "{\n let x := \"\\xe1\\xae\\xac\"\n}";
+ string parsed = "object \"object\" {\n code {\n let x := \"\\xe1\\xae\\xac\"\n }\n}\n";
AssemblyStack stack(dev::test::Options::get().evmVersion());
BOOST_REQUIRE(stack.parseAndAnalyze("", source));
BOOST_REQUIRE(stack.errors().empty());
BOOST_CHECK_EQUAL(stack.print(), parsed);
- parsePrintCompare(parsed);
+
+ string parsedInner = "{\n let x := \"\\xe1\\xae\\xac\"\n}";
+ parsePrintCompare(parsedInner);
}
BOOST_AUTO_TEST_CASE(print_if)