[lld] r205663 - [ELF] Add a test for -rpath.
Rui Ueyama
ruiu at google.com
Fri Apr 4 19:15:24 PDT 2014
Author: ruiu
Date: Fri Apr 4 21:15:23 2014
New Revision: 205663
URL: http://llvm.org/viewvc/llvm-project?rev=205663&view=rev
Log:
[ELF] Add a test for -rpath.
Modified:
lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp
Modified: lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp?rev=205663&r1=205662&r2=205663&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp Fri Apr 4 21:15:23 2014
@@ -60,7 +60,17 @@ TEST_F(GnuLdParserTest, SONameH) {
EXPECT_EQ("foo", _context->sharedObjectName());
}
-// Tests for --defsym
+// -rpath
+
+TEST_F(GnuLdParserTest, Rpath) {
+ EXPECT_TRUE(parse("ld", "--start-group", "--end-group", "-rpath", "foo:bar",
+ nullptr));
+ EXPECT_EQ(2, _context->getRpathList().size());
+ EXPECT_EQ("foo", _context->getRpathList()[0]);
+ EXPECT_EQ("bar", _context->getRpathList()[1]);
+}
+
+// --defsym
TEST_F(GnuLdParserTest, DefsymDecimal) {
EXPECT_TRUE(parse("ld", "--start-group", "--end-group", "--defsym=sym=1000",
More information about the llvm-commits
mailing list