aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/Imports.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-12-15 22:46:03 +0800
committerchriseth <c@ethdev.com>2015-12-18 19:46:56 +0800
commit603dc58040e62ef99d0a10084340dd4548a438a8 (patch)
tree2c9246af514f8023117800bd8675703fc8d02fb4 /test/libsolidity/Imports.cpp
parentd3c459b5a99715c96733825f78d63cc57265ee3c (diff)
downloaddexon-solidity-603dc58040e62ef99d0a10084340dd4548a438a8.tar.gz
dexon-solidity-603dc58040e62ef99d0a10084340dd4548a438a8.tar.zst
dexon-solidity-603dc58040e62ef99d0a10084340dd4548a438a8.zip
Simple aliasing during import.
Diffstat (limited to 'test/libsolidity/Imports.cpp')
-rw-r--r--test/libsolidity/Imports.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/Imports.cpp b/test/libsolidity/Imports.cpp
index ab8e2257..57239cb9 100644
--- a/test/libsolidity/Imports.cpp
+++ b/test/libsolidity/Imports.cpp
@@ -93,6 +93,14 @@ BOOST_AUTO_TEST_CASE(relative_import_multiplex)
BOOST_CHECK(c.compile());
}
+BOOST_AUTO_TEST_CASE(simple_alias)
+{
+ CompilerStack c;
+ c.addSource("a", "contract A {}");
+ c.addSource("dir/a/b/c", "import \"../../.././a\" as x; contract B { function() { x.A r = x.A(20); } }");
+ BOOST_CHECK(c.compile());
+}
+
BOOST_AUTO_TEST_SUITE_END()
}