From cf3ac49639bef5082489068e2d92a4d86f42080b Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 20 Mar 2025 19:28:57 -0400 Subject: Rewrite all Dram tests to use Fixture --- tests/cache.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/cache.cc') diff --git a/tests/cache.cc b/tests/cache.cc index daaec90..1fc5209 100644 --- a/tests/cache.cc +++ b/tests/cache.cc @@ -15,7 +15,7 @@ TEST_CASE("Constructor singleton cache", "[cache]") TEST_CASE("no delay stores instantly", "[cache]") { int delay = 0; - Dram *d = new Dram(MEM_LINES, delay); + Dram *d = new Dram(delay); Cache *c = new Cache(d, delay); std::array expected = {0, 0, 0, 0}; std::array actual = d->view(0, 1)[0]; @@ -43,7 +43,7 @@ TEST_CASE("no delay stores instantly", "[cache]") TEST_CASE("cache takes \"forever\"", "[cache]") { int delay = 0; - Dram *d = new Dram(MEM_LINES, delay); + Dram *d = new Dram(delay); Cache *c = new Cache(d, delay + 2); std::array expected = {0, 0, 0, 0}; std::array actual = d->view(0, 1)[0]; @@ -79,7 +79,7 @@ TEST_CASE("cache takes \"forever\"", "[cache]") TEST_CASE("dram takes \"forever\"", "[cache]") { int delay = 0; - Dram *d = new Dram(MEM_LINES, delay + 2); + Dram *d = new Dram(delay + 2); Cache *c = new Cache(d, delay); std::array expected = {0, 0, 0, 0}; std::array actual = d->view(0, 1)[0]; @@ -115,7 +115,7 @@ TEST_CASE("dram takes \"forever\"", "[cache]") TEST_CASE("dram and cache take \"forever\"", "[cache]") { int delay = 2; - Dram *d = new Dram(MEM_LINES, delay + 2); + Dram *d = new Dram(delay + 2); Cache *c = new Cache(d, delay); std::array expected = {0, 0, 0, 0}; std::array actual = d->view(0, 1)[0]; @@ -162,7 +162,7 @@ TEST_CASE( "dram takes \"forever\", two concurrent requests same index", "[cache]") { int delay = 0; - Dram *d = new Dram(MEM_LINES, delay + 2); + Dram *d = new Dram(delay + 2); Cache *c = new Cache(d, delay); std::array expected = {0, 0, 0, 0}; std::array actual = d->view(0, 1)[0]; @@ -217,7 +217,7 @@ TEST_CASE( "[cache]") { int delay = 0; - Dram *d = new Dram(MEM_LINES, delay + 2); + Dram *d = new Dram(delay + 2); Cache *c = new Cache(d, delay); std::array expected = {0, 0, 0, 0}; std::array actual = d->view(0, 1)[0]; -- cgit v1.2.3