diff --git a/unittests/ADT/StatisticTest.cpp b/unittests/ADT/StatisticTest.cpp index eb7a947224d..e5a0cad26d6 100644 --- a/unittests/ADT/StatisticTest.cpp +++ b/unittests/ADT/StatisticTest.cpp @@ -68,6 +68,8 @@ TEST(StatisticTest, Assign) { TEST(StatisticTest, API) { EnableStatistics(); + // Reset beforehand to make sure previous tests don't effect this one. + ResetStatistics(); Counter = 0; EXPECT_EQ(Counter, 0u);