diff options
author | chriseth <c@ethdev.com> | 2017-02-15 22:21:11 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-15 22:21:11 +0800 |
commit | 5e8a1e0ae6dcd269258fe4239060bcc890abacb5 (patch) | |
tree | 12a9fe2556bd87a0d7e2695db724d65434f40f42 /test/libsolidity/InlineAssembly.cpp | |
parent | 24197a2b3f7f94dac03b6ac30802069011cf036c (diff) | |
download | dexon-solidity-5e8a1e0ae6dcd269258fe4239060bcc890abacb5.tar.gz dexon-solidity-5e8a1e0ae6dcd269258fe4239060bcc890abacb5.tar.zst dexon-solidity-5e8a1e0ae6dcd269258fe4239060bcc890abacb5.zip |
Test for unicode string literals.
Diffstat (limited to 'test/libsolidity/InlineAssembly.cpp')
-rw-r--r-- | test/libsolidity/InlineAssembly.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index 437c5866..8744d96f 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -198,6 +198,17 @@ BOOST_AUTO_TEST_CASE(print_string_literals) parsePrintCompare("{\n \"\\n'\\xab\\x95\\\"\"\n}"); } +BOOST_AUTO_TEST_CASE(print_string_literal_unicode) +{ + string source = "{ \"\\u1bac\" }"; + string parsed = "{\n \"\\xe1\\xae\\xac\"\n}"; + assembly::InlineAssemblyStack stack; + BOOST_REQUIRE(stack.parse(std::make_shared<Scanner>(CharStream(source)))); + BOOST_REQUIRE(stack.errors().empty()); + BOOST_CHECK_EQUAL(stack.toString(), parsed); + parsePrintCompare(parsed); +} + BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE(Analysis) |