diff options
Diffstat (limited to 'lld/unittests/DriverTests/WinLinkDriverTest.cpp')
-rw-r--r-- | lld/unittests/DriverTests/WinLinkDriverTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp index 89a590fbd91..fbe6cdd8498 100644 --- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp +++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp @@ -341,6 +341,21 @@ TEST_F(WinLinkParserTest, DisallowLib) { } // +// Tests for DLL. +// + +TEST_F(WinLinkParserTest, NoEntry) { + EXPECT_TRUE(parse("link.exe", "/noentry", "/dll", "a.obj", nullptr)); + EXPECT_EQ("", _context.entrySymbolName()); +} + +TEST_F(WinLinkParserTest, NoEntryError) { + // /noentry without /dll is an error. + EXPECT_FALSE(parse("link.exe", "/noentry", "a.obj", nullptr)); + EXPECT_EQ("/noentry must be specified with /dll\n", errorMessage()); +} + +// // Tests for boolean flags. // |