From 256fd73b42ae7d10fe0190984d032f839a2127bd Mon Sep 17 00:00:00 2001 From: bd Date: Tue, 11 Mar 2025 17:24:49 -0400 Subject: clarify macro names, implement load in CLI, fix many display issues --- tests/utils.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/utils.cc') diff --git a/tests/utils.cc b/tests/utils.cc index f0e4c24..900db1a 100644 --- a/tests/utils.cc +++ b/tests/utils.cc @@ -24,21 +24,21 @@ TEST_CASE("Parse arbitrary fields # two", "[cache]") TEST_CASE("wrap address outside upper bound", "[utils]") { - int address = MEM_SIZE + 25; + int address = MEM_LINES + 25; int wrapped = wrap_address(address); REQUIRE(wrapped == 25); } TEST_CASE("wrap address inside upper bound", "[utils]") { - int address = MEM_SIZE - 25; + int address = MEM_LINES - 25; int wrapped = wrap_address(address); - REQUIRE(wrapped == MEM_SIZE - 25); + REQUIRE(wrapped == MEM_LINES - 25); } TEST_CASE("wrap address at upper bound", "[utils]") { - int address = MEM_SIZE; + int address = MEM_LINES; int wrapped = wrap_address(address); REQUIRE(wrapped == 0); } @@ -47,14 +47,14 @@ TEST_CASE("wrap address lower than 0 with magnitude lesser than mem size", "[uti { int address = -10; int wrapped = wrap_address(address); - REQUIRE(wrapped == MEM_SIZE - 10); + REQUIRE(wrapped == MEM_LINES - 10); } TEST_CASE("wrap address lower than 0 but with magnitude greater than mem size", "[utils]") { - int address = -(MEM_SIZE + 10); + int address = -(MEM_LINES + 10); int wrapped = wrap_address(address); - REQUIRE(wrapped == MEM_SIZE - 10); + REQUIRE(wrapped == MEM_LINES - 10); } TEST_CASE("wrap address at 0", "[utils]") @@ -62,4 +62,4 @@ TEST_CASE("wrap address at 0", "[utils]") int address = 0; int wrapped = wrap_address(address); REQUIRE(wrapped == 0); -} \ No newline at end of file +} -- cgit v1.2.3