[lld] r182971 - [WinLink] Add a test for Windows-style command line options.

Rui Ueyama ruiu at google.com
Thu May 30 16:29:29 PDT 2013


Author: ruiu
Date: Thu May 30 18:29:28 2013
New Revision: 182971

URL: http://llvm.org/viewvc/llvm-project?rev=182971&view=rev
Log:
[WinLink] Add a test for Windows-style command line options.

Modified:
    lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp

Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=182971&r1=182970&r2=182971&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Thu May 30 18:29:28 2013
@@ -66,7 +66,18 @@ TEST_F(ParserTest, Basic) {
   EXPECT_EQ("c.obj", inputFiles[2].getPath());
 }
 
-TEST_F(ParserTest, NoFileEXtension) {
+TEST_F(ParserTest, WindowsStyleOption) {
+  parse("/subsystem:console", "/out:a.exe", "a.obj", nullptr);
+
+  EXPECT_EQ(llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_CUI, info.getSubsystem());
+  EXPECT_EQ("a.exe", info.outputPath());
+
+  const std::vector<LinkerInput> &inputFiles = info.inputFiles();
+  EXPECT_EQ((size_t)1, inputFiles.size());
+  EXPECT_EQ("a.obj", inputFiles[0].getPath());
+}
+
+TEST_F(ParserTest, NoFileExtension) {
   parse("foo", "bar", nullptr);
 
   EXPECT_EQ("foo.exe", info.outputPath());





More information about the llvm-commits mailing list