diff options
author | bd <bdunahu@operationnull.com> | 2025-03-20 19:28:57 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-20 19:28:57 -0400 |
commit | cf3ac49639bef5082489068e2d92a4d86f42080b (patch) | |
tree | ffd8e0bd2b112180251804a096f601f745f9af1b /tests/cache.cc | |
parent | 91cddc344db947c83c995c6f48fc23d54439c6eb (diff) |
Rewrite all Dram tests to use Fixture
Diffstat (limited to 'tests/cache.cc')
-rw-r--r-- | tests/cache.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; std::array<signed int, LINE_SIZE> 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<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; std::array<signed int, LINE_SIZE> 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<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; std::array<signed int, LINE_SIZE> 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<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; std::array<signed int, LINE_SIZE> 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<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; std::array<signed int, LINE_SIZE> 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<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; std::array<signed int, LINE_SIZE> actual = d->view(0, 1)[0]; |