diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-08 21:07:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-08 21:07:09 -0500 |
commit | 212a47482c5c037720aef726fcb2b7bb3a3acd67 (patch) | |
tree | e76871ceee74d36a660d5347c694493411426a7b /tests/cache.cc | |
parent | f8ed20ddbcb602ca0c5eea57fb78fb42d008f797 (diff) | |
parent | 5a24c4b2012cd2d5fe954deb3b973cb6125e860d (diff) |
Merge pull request #14 from bdunahu/bdunahuer
Storage.view + Dram.store methods, tests
Diffstat (limited to 'tests/cache.cc')
-rw-r--r-- | tests/cache.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/cache.cc b/tests/cache.cc index 6580563..3c1fba6 100644 --- a/tests/cache.cc +++ b/tests/cache.cc @@ -1,8 +1,12 @@ #include "cache.h" +#include "definitions.h" #include <catch2/catch_test_macros.hpp> -TEST_CASE("Constructor initialize test 1", "[cache]") +TEST_CASE("Constructor singleton dram", "[cache]") { - Cache *c = new Cache(1, nullptr, 4); + Cache *c = new Cache(1, nullptr, LINE_SIZE); + std::array<signed int, LINE_SIZE> expected = {0, 0, 0, 0}; + std::array<signed int, LINE_SIZE> actual = c->view(0, 1)[0]; + REQUIRE(expected == actual); delete c; } |