From fe72d5a3fce499092c842b48df997eb0aa54fc05 Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Wed, 17 Mar 2021 10:47:39 -0700 Subject: [PATCH] Rename fixtures in test/unit/context to conform to naming scheme. (#6158) Naming scheme is `Test`. --- test/unit/context/CMakeLists.txt | 4 ++-- .../{cdmap_black.cpp => cdhashmap_black.cpp} | 8 +++---- .../{cdmap_white.cpp => cdhashmap_white.cpp} | 4 ++-- test/unit/context/cdlist_black.cpp | 22 +++++++++---------- test/unit/context/cdo_black.cpp | 4 ++-- test/unit/context/context_mm_black.cpp | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) rename test/unit/context/{cdmap_black.cpp => cdhashmap_black.cpp} (95%) rename test/unit/context/{cdmap_white.cpp => cdhashmap_white.cpp} (90%) diff --git a/test/unit/context/CMakeLists.txt b/test/unit/context/CMakeLists.txt index 9ea30082c..9bf07e13c 100644 --- a/test/unit/context/CMakeLists.txt +++ b/test/unit/context/CMakeLists.txt @@ -12,8 +12,8 @@ # Add unit tests cvc4_add_unit_test_black(cdlist_black context) -cvc4_add_unit_test_black(cdmap_black context) -cvc4_add_unit_test_white(cdmap_white context) +cvc4_add_unit_test_black(cdhashmap_black context) +cvc4_add_unit_test_white(cdhashmap_white context) cvc4_add_unit_test_black(cdo_black context) cvc4_add_unit_test_black(context_black context) cvc4_add_unit_test_black(context_mm_black context) diff --git a/test/unit/context/cdmap_black.cpp b/test/unit/context/cdhashmap_black.cpp similarity index 95% rename from test/unit/context/cdmap_black.cpp rename to test/unit/context/cdhashmap_black.cpp index 3741ba3bb..a5788a585 100644 --- a/test/unit/context/cdmap_black.cpp +++ b/test/unit/context/cdhashmap_black.cpp @@ -27,7 +27,7 @@ namespace test { using CVC4::context::CDHashMap; using CVC4::context::Context; -class TestContextCDMapBlack : public TestContext +class TestContextBlackCDHashMap : public TestContext { protected: /** Returns the elements in a CDHashMap. */ @@ -49,7 +49,7 @@ class TestContextCDMapBlack : public TestContext } }; -TEST_F(TestContextCDMapBlack, simple_sequence) +TEST_F(TestContextBlackCDHashMap, simple_sequence) { CDHashMap map(d_context.get()); ASSERT_TRUE(elements_are(map, {})); @@ -100,7 +100,7 @@ TEST_F(TestContextCDMapBlack, simple_sequence) ASSERT_TRUE(elements_are(map, {{3, 4}, {23, 317}})); } -TEST_F(TestContextCDMapBlack, simple_sequence_fewer_finds) +TEST_F(TestContextBlackCDHashMap, simple_sequence_fewer_finds) { // no intervening find() in this one (under the theory that this could trigger // a bug) @@ -131,7 +131,7 @@ TEST_F(TestContextCDMapBlack, simple_sequence_fewer_finds) } } -TEST_F(TestContextCDMapBlack, insert_at_context_level_zero) +TEST_F(TestContextBlackCDHashMap, insert_at_context_level_zero) { CDHashMap map(d_context.get()); diff --git a/test/unit/context/cdmap_white.cpp b/test/unit/context/cdhashmap_white.cpp similarity index 90% rename from test/unit/context/cdmap_white.cpp rename to test/unit/context/cdhashmap_white.cpp index dbc01b3b5..91ddc726d 100644 --- a/test/unit/context/cdmap_white.cpp +++ b/test/unit/context/cdhashmap_white.cpp @@ -24,11 +24,11 @@ using namespace context; namespace test { -class TestContextCDMapWhite : public TestContext +class TestContextWhiteCDHashMap : public TestContext { }; -TEST_F(TestContextCDMapWhite, unreachable_save_and_restore) +TEST_F(TestContextWhiteCDHashMap, unreachable_save_and_restore) { CDHashMap map(d_context.get()); diff --git a/test/unit/context/cdlist_black.cpp b/test/unit/context/cdlist_black.cpp index f884ab695..2339962ac 100644 --- a/test/unit/context/cdlist_black.cpp +++ b/test/unit/context/cdlist_black.cpp @@ -37,7 +37,7 @@ struct DtorSensitiveObject ~DtorSensitiveObject() { d_dtorCalled = true; } }; -class TestContextCDListBlack : public TestContext +class TestContextBlackCDList : public TestContext { protected: void list_test(int n) @@ -73,19 +73,19 @@ class TestContextCDListBlack : public TestContext } }; -TEST_F(TestContextCDListBlack, CDList10) { list_test(10); } +TEST_F(TestContextBlackCDList, CDList10) { list_test(10); } -TEST_F(TestContextCDListBlack, CDList15) { list_test(15); } +TEST_F(TestContextBlackCDList, CDList15) { list_test(15); } -TEST_F(TestContextCDListBlack, CDList20) { list_test(20); } +TEST_F(TestContextBlackCDList, CDList20) { list_test(20); } -TEST_F(TestContextCDListBlack, CDList35) { list_test(35); } +TEST_F(TestContextBlackCDList, CDList35) { list_test(35); } -TEST_F(TestContextCDListBlack, CDList50) { list_test(50); } +TEST_F(TestContextBlackCDList, CDList50) { list_test(50); } -TEST_F(TestContextCDListBlack, CDList99) { list_test(99); } +TEST_F(TestContextBlackCDList, CDList99) { list_test(99); } -TEST_F(TestContextCDListBlack, destructor_called) +TEST_F(TestContextBlackCDList, destructor_called) { bool shouldRemainFalse = false; bool shouldFlipToTrue = false; @@ -129,14 +129,14 @@ TEST_F(TestContextCDListBlack, destructor_called) ASSERT_EQ(aThirdFalse, false); } -TEST_F(TestContextCDListBlack, empty_iterator) +TEST_F(TestContextBlackCDList, empty_iterator) { CDList* list = new (true) CDList(d_context.get()); ASSERT_EQ(list->begin(), list->end()); list->deleteSelf(); } -TEST_F(TestContextCDListBlack, out_of_memory) +TEST_F(TestContextBlackCDList, out_of_memory) { #ifndef CVC4_MEMORY_LIMITING_DISABLED CDList list(d_context.get()); @@ -155,7 +155,7 @@ TEST_F(TestContextCDListBlack, out_of_memory) #endif } -TEST_F(TestContextCDListBlack, pop_below_level_created) +TEST_F(TestContextBlackCDList, pop_below_level_created) { d_context->push(); CDList list(d_context.get()); diff --git a/test/unit/context/cdo_black.cpp b/test/unit/context/cdo_black.cpp index 2025ba29d..16d7949e0 100644 --- a/test/unit/context/cdo_black.cpp +++ b/test/unit/context/cdo_black.cpp @@ -28,11 +28,11 @@ using namespace context; namespace test { -class TestContextCDOBlack : public TestContext +class TestContextBlackCDO : public TestContext { }; -TEST_F(TestContextCDOBlack, cdo) +TEST_F(TestContextBlackCDO, cdo) { // Test that push/pop maintains the original value CDO a1(d_context.get()); diff --git a/test/unit/context/context_mm_black.cpp b/test/unit/context/context_mm_black.cpp index 024bfd47b..b0259e71e 100644 --- a/test/unit/context/context_mm_black.cpp +++ b/test/unit/context/context_mm_black.cpp @@ -27,14 +27,14 @@ using namespace context; namespace test { -class TestContextMMBlack : public TestInternal +class TestContextBlackMM : public TestInternal { protected: void SetUp() override { d_cmm.reset(new ContextMemoryManager()); } std::unique_ptr d_cmm; }; -TEST_F(TestContextMMBlack, push_pop) +TEST_F(TestContextBlackMM, push_pop) { #ifdef CVC4_DEBUG_CONTEXT_MEMORY_MANAGER #warning "Using the debug context memory manager, omitting unit tests" -- 2.30.2