aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-07-15 00:53:38 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-07-15 00:53:38 +0800
commit6b068c6726a448847d6516e4d43a0c3103bed989 (patch)
tree5ff66964cb77cbcf17957eed474d180945948a53 /libsolidity/SolidityEndToEndTest.cpp
parentc99c60c32fea82b8f791fc8f1e1950b5ae1bb1bc (diff)
parenta904cafa389c46eb5ce0961fccb424f058ac977d (diff)
downloaddexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.tar
dexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.tar.gz
dexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.tar.bz2
dexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.tar.lz
dexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.tar.xz
dexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.tar.zst
dexon-solidity-6b068c6726a448847d6516e4d43a0c3103bed989.zip
Merge branch 'develop' into client_ref
Diffstat (limited to 'libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--libsolidity/SolidityEndToEndTest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp
index ad217546..9f806347 100644
--- a/libsolidity/SolidityEndToEndTest.cpp
+++ b/libsolidity/SolidityEndToEndTest.cpp
@@ -585,6 +585,22 @@ BOOST_AUTO_TEST_CASE(inc_dec_operators)
BOOST_CHECK(callContractFunction("f()") == encodeArgs(0x53866));
}
+BOOST_AUTO_TEST_CASE(bytes_comparison)
+{
+ char const* sourceCode = R"(
+ contract test {
+ function f() returns (bool) {
+ bytes2 a = "a";
+ bytes2 x = "aa";
+ bytes2 b = "b";
+ return a < x && x < b;
+ }
+ }
+ )";
+ compileAndRun(sourceCode);
+ BOOST_CHECK(callContractFunction("f()") == encodeArgs(true));
+}
+
BOOST_AUTO_TEST_CASE(state_smoke_test)
{
char const* sourceCode = "contract test {\n"