summaryrefslogtreecommitdiff
path: root/tests/cache.cc
blob: 3c1fba614db4cf32ad3e57651c72a6a696884da5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "cache.h"
#include "definitions.h"
#include <catch2/catch_test_macros.hpp>

TEST_CASE("Constructor singleton dram", "[cache]")
{
	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;
}