[PECOFF] Add another test for the module-definition file parser.

llvm-svn: 199159
This commit is contained in:
Rui Ueyama 2014-01-13 22:55:09 +00:00
parent da3bba445b
commit 69c26e903b
1 changed files with 11 additions and 0 deletions

View File

@ -108,6 +108,17 @@ TEST_F(ParserTest, Name2) {
EXPECT_EQ(4096U, name->getBaseAddress());
}
TEST_F(ParserTest, Name3) {
llvm::BumpPtrAllocator alloc;
llvm::Optional<moduledef::Directive *> dir = parse(
"NAME \"a long file name.exe\"", alloc);
EXPECT_TRUE(dir.hasValue());
auto *name = dyn_cast<moduledef::Name>(dir.getValue());
EXPECT_TRUE(name != nullptr);
EXPECT_EQ("a long file name.exe", name->getOutputPath());
EXPECT_EQ(0U, name->getBaseAddress());
}
TEST_F(ParserTest, Version1) {
llvm::BumpPtrAllocator alloc;
llvm::Optional<moduledef::Directive *> dir = parse("VERSION 12", alloc);