Have setUp() return the target machine so that the test has to call it to be able
to use it in the if(!TM)
Also, rename setUp() to avoid potential mix up with SetUp() from gtest
Paths
| Differential D99692
[globalisel][unittests] Make it a compiler error to not call setUp() to avoid future rotten green tests ClosedPublic Authored by dsanders on Mar 31 2021, 4:36 PM.
Details Summary Have setUp() return the target machine so that the test has to call it to be able Also, rename setUp() to avoid potential mix up with SetUp() from gtest
Diff Detail
Event TimelineComment Actions The title/summary seems a bit confusing. The interesting part of this change is having the set up function return a target machine so it's impossible to miss - IMO renaming it is incidental. This seems reasonable to do, but I think it'd be better titled something along the lines of "Return a target machine from the test setup so that it's structurally required" This revision is now accepted and ready to land.Mar 31 2021, 4:54 PM Comment Actions
Sure I can swap them around. Thanks dsanders retitled this revision from [globalisel][unittests] Rename setUp() to avoid potential mix up with SetUp() from gtest to [globalisel][unittests] Make it a compiler error to not call setUp() to avoid future rotten green tests.Mar 31 2021, 5:07 PM Comment Actions I wasn't sure whether setUp() was supposed to be SetUp() or not. Good to have that confusion go away! Closed by commit rG3a016e31ecef: [globalisel][unittests] Rename setUp() to avoid potential mix up with SetUp()… (authored by dsanders). · Explain WhyApr 1 2021, 4:42 PM This revision was automatically updated to reflect the committed changes. Comment Actions Looks like phabricator noticed the revert but not the recommit. Here's the recommit:
I forgot to update my local commit message to the phabricator one before committing the first time around
Revision Contents
Diff 334853 llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
llvm/unittests/CodeGen/GlobalISel/ConstantFoldingTest.cpp
llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
llvm/unittests/CodeGen/GlobalISel/KnownBitsVectorTest.cpp
llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
llvm/unittests/CodeGen/GlobalISel/LegalizerTest.cpp
llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp
llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
|