From a59c031ca0521bfb00bfc5f8f65af45c89804a37 Mon Sep 17 00:00:00 2001 From: bd Date: Tue, 11 Mar 2025 11:54:21 -0400 Subject: Clarify size of mem and cache in definitions, CLI print invalid tags --- 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 e8a257f..d463fc9 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_SIZE, delay); + Dram *d = new Dram(MEM_LINES, 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_SIZE, delay); + Dram *d = new Dram(MEM_LINES, 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_SIZE, delay + 2); + Dram *d = new Dram(MEM_LINES, 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_SIZE, delay + 2); + Dram *d = new Dram(MEM_LINES, 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_SIZE, delay + 2); + Dram *d = new Dram(MEM_LINES, 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_SIZE, delay + 2); + Dram *d = new Dram(MEM_LINES, 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