diff options
author | chriseth <c@ethdev.com> | 2016-01-12 02:40:04 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-01-14 18:36:11 +0800 |
commit | 1cf6acca90b6876c83676b0dc04babd3efcbf092 (patch) | |
tree | 707dce87b088c31c0fe2a6f781adbb6bb0da06d6 /test/libsolidity | |
parent | d2f18c73f75ad5983550fe8a985824d0fda0b640 (diff) | |
download | dexon-solidity-1cf6acca90b6876c83676b0dc04babd3efcbf092.tar.gz dexon-solidity-1cf6acca90b6876c83676b0dc04babd3efcbf092.tar.zst dexon-solidity-1cf6acca90b6876c83676b0dc04babd3efcbf092.zip |
Tests for library name clashes.
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/Imports.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/Imports.cpp b/test/libsolidity/Imports.cpp index c074b332..94d3e423 100644 --- a/test/libsolidity/Imports.cpp +++ b/test/libsolidity/Imports.cpp @@ -101,6 +101,22 @@ BOOST_AUTO_TEST_CASE(simple_alias) BOOST_CHECK(c.compile()); } +BOOST_AUTO_TEST_CASE(library_name_clash) +{ + CompilerStack c; + c.addSource("a", "library A {}"); + c.addSource("b", "library A {}"); + BOOST_CHECK(!c.compile()); +} + +BOOST_AUTO_TEST_CASE(library_name_clash_with_contract) +{ + CompilerStack c; + c.addSource("a", "contract A {}"); + c.addSource("b", "library A {}"); + BOOST_CHECK(c.compile()); +} + BOOST_AUTO_TEST_CASE(complex_import) { CompilerStack c; |