From 486d18df5ca93e043fdd14fac1d22b5fe40fb6f6 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 10 Mar 2025 14:53:59 -0400 Subject: Update cli method signatures, add some getters to cache and storage --- tests/cache.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'tests/cache.cc') diff --git a/tests/cache.cc b/tests/cache.cc index 8d1e806..fc467c7 100644 --- a/tests/cache.cc +++ b/tests/cache.cc @@ -38,7 +38,6 @@ TEST_CASE("no delay stores instantly", "[cache]") actual = c->view(0, 1)[0]; REQUIRE(expected == actual); - delete d; delete c; } @@ -77,7 +76,6 @@ TEST_CASE("cache takes \"forever\"", "[cache]") actual = c->view(0, 1)[0]; REQUIRE(expected == actual); - delete d; delete c; } @@ -116,7 +114,6 @@ TEST_CASE("dram takes \"forever\"", "[cache]") actual = c->view(0, 1)[0]; REQUIRE(expected == actual); - delete d; delete c; } @@ -166,11 +163,11 @@ TEST_CASE("dram and cache take \"forever\"", "[cache]") actual = c->view(0, 1)[0]; REQUIRE(expected == actual); - delete d; delete c; } -TEST_CASE("dram takes \"forever\", two concurrent requests same index", "[cache]") +TEST_CASE( + "dram takes \"forever\", two concurrent requests same index", "[cache]") { int delay = 0; Dram *d = new Dram(MEM_SIZE, delay + 2); @@ -223,11 +220,12 @@ TEST_CASE("dram takes \"forever\", two concurrent requests same index", "[cache] actual = c->view(0, 1)[0]; REQUIRE(expected == actual); - delete d; delete c; } -TEST_CASE("dram takes \"forever\", two concurrent requests different index", "[cache]") +TEST_CASE( + "dram takes \"forever\", two concurrent requests different index", + "[cache]") { int delay = 0; Dram *d = new Dram(MEM_SIZE, delay + 2); @@ -289,11 +287,11 @@ TEST_CASE("dram takes \"forever\", two concurrent requests different index", "[c actual = c->view(0, 1)[0]; REQUIRE(expected == actual); - delete d; delete c; } -TEST_CASE("dram takes \"forever\", two concurrent requests different tag", "[cache]") +TEST_CASE( + "dram takes \"forever\", two concurrent requests different tag", "[cache]") { // TODO } -- cgit v1.2.3