[lld] r205735 - [ELF] Unit tests for -o and --noinhibit-exec.

Rui Ueyama ruiu at google.com
Mon Apr 7 13:52:48 PDT 2014


Author: ruiu
Date: Mon Apr  7 15:52:48 2014
New Revision: 205735

URL: http://llvm.org/viewvc/llvm-project?rev=205735&view=rev
Log:
[ELF] Unit tests for -o and --noinhibit-exec.

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=205735&r1=205734&r2=205735&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp Mon Apr  7 15:52:48 2014
@@ -40,6 +40,22 @@ TEST_F(GnuLdParserTest, Empty) {
   EXPECT_EQ("No input files\n", errorMessage());
 }
 
+// -o
+
+TEST_F(GnuLdParserTest, Output) {
+  EXPECT_TRUE(parse("ld", "--start-group", "--end-group", "-o", "foo",
+                    nullptr));
+  EXPECT_EQ("foo", _context->outputPath());
+}
+
+// --noinhibit-exec
+
+TEST_F(GnuLdParserTest, NoinhibitExec) {
+  EXPECT_TRUE(parse("ld", "--start-group", "--end-group", "--noinhibit-exec",
+                    nullptr));
+  EXPECT_TRUE(_context->allowRemainingUndefines());
+}
+
 // --entry
 
 TEST_F(GnuLdParserTest, Entry) {





More information about the llvm-commits mailing list