[lld] r199161 - Use bettter names for the tests.
Sean Silva
silvas at purdue.edu
Mon Jan 13 15:12:43 PST 2014
Could you put the `llvm::BumpPtrAllocator alloc;` in the test fixture to
reduce the boilerplate in these test cases? If possible, removing the
`alloc` argument from the calls to parse() (or defaulting to the allocator
in the fixture) would also clean things up.
-- Sean Silva
On Mon, Jan 13, 2014 at 6:02 PM, Rui Ueyama <ruiu at google.com> wrote:
> Author: ruiu
> Date: Mon Jan 13 17:02:03 2014
> New Revision: 199161
>
> URL: http://llvm.org/viewvc/llvm-project?rev=199161&view=rev
> Log:
> Use bettter names for the tests.
>
> Modified:
> lld/trunk/unittests/DriverTests/WinLinkModuleDefTest.cpp
>
> Modified: lld/trunk/unittests/DriverTests/WinLinkModuleDefTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkModuleDefTest.cpp?rev=199161&r1=199160&r2=199161&view=diff
>
> ==============================================================================
> --- lld/trunk/unittests/DriverTests/WinLinkModuleDefTest.cpp (original)
> +++ lld/trunk/unittests/DriverTests/WinLinkModuleDefTest.cpp Mon Jan 13
> 17:02:03 2014
> @@ -68,7 +68,7 @@ TEST_F(ParserTest, Exports) {
> EXPECT_EQ(exports[4].isData, true);
> }
>
> -TEST_F(ParserTest, Heapsize1) {
> +TEST_F(ParserTest, Heapsize) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse("HEAPSIZE 65536",
> alloc);
> EXPECT_TRUE(dir.hasValue());
> @@ -78,7 +78,7 @@ TEST_F(ParserTest, Heapsize1) {
> EXPECT_EQ(0U, heapsize->getCommit());
> }
>
> -TEST_F(ParserTest, Heapsize2) {
> +TEST_F(ParserTest, Heapsize_WithCommit) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse("HEAPSIZE 65536,
> 8192", alloc);
> EXPECT_TRUE(dir.hasValue());
> @@ -88,7 +88,7 @@ TEST_F(ParserTest, Heapsize2) {
> EXPECT_EQ(8192U, heapsize->getCommit());
> }
>
> -TEST_F(ParserTest, Name1) {
> +TEST_F(ParserTest, Name) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse("NAME foo.exe",
> alloc);
> EXPECT_TRUE(dir.hasValue());
> @@ -98,7 +98,7 @@ TEST_F(ParserTest, Name1) {
> EXPECT_EQ(0U, name->getBaseAddress());
> }
>
> -TEST_F(ParserTest, Name2) {
> +TEST_F(ParserTest, Name_WithBase) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse("NAME foo.exe
> BASE=4096", alloc);
> EXPECT_TRUE(dir.hasValue());
> @@ -108,7 +108,7 @@ TEST_F(ParserTest, Name2) {
> EXPECT_EQ(4096U, name->getBaseAddress());
> }
>
> -TEST_F(ParserTest, Name3) {
> +TEST_F(ParserTest, Name_LongFileName) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse(
> "NAME \"a long file name.exe\"", alloc);
> @@ -119,7 +119,7 @@ TEST_F(ParserTest, Name3) {
> EXPECT_EQ(0U, name->getBaseAddress());
> }
>
> -TEST_F(ParserTest, Version1) {
> +TEST_F(ParserTest, Version_Major) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse("VERSION 12", alloc);
> EXPECT_TRUE(dir.hasValue());
> @@ -129,7 +129,7 @@ TEST_F(ParserTest, Version1) {
> EXPECT_EQ(0, ver->getMinorVersion());
> }
>
> -TEST_F(ParserTest, Version2) {
> +TEST_F(ParserTest, Version_MajorMinor) {
> llvm::BumpPtrAllocator alloc;
> llvm::Optional<moduledef::Directive *> dir = parse("VERSION 12.34",
> alloc);
> EXPECT_TRUE(dir.hasValue());
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140113/a8116761/attachment.html>
More information about the llvm-commits
mailing list