[DebugCounters] Fix DebugCounterTest when running all SupportTests
Previously, the DebugCounterTest was failing because CommandLineTest.GetCommandLineArguments was clearing all the global singletons.
Differential Revision: https://reviews.llvm.org/D51423
llvm-svn: 340935
diff --git a/llvm/unittests/Support/DebugCounterTest.cpp b/llvm/unittests/Support/DebugCounterTest.cpp
index f3c2817..32bf56c 100644
--- a/llvm/unittests/Support/DebugCounterTest.cpp
+++ b/llvm/unittests/Support/DebugCounterTest.cpp
@@ -14,10 +14,9 @@
using namespace llvm;
#ifndef NDEBUG
-DEBUG_COUNTER(TestCounter, "test-counter",
- "Counter used for unit test");
-
TEST(DebugCounterTest, CounterCheck) {
+ DEBUG_COUNTER(TestCounter, "test-counter", "Counter used for unit test");
+
EXPECT_FALSE(DebugCounter::isCounterSet(TestCounter));
auto DC = &DebugCounter::instance();