diff options
-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; |