<commit_before>
#include "catch.hpp"
#include "Chip8Memory.hpp"
#include <iostream>

TEST_CASE("Chip8Memory/constructor") {
	Chip8Memory obj;

	for (int i = 0; i < Chip8MemorySize; ++i) {
		u8 result = obj.readByte(i);
		REQUIRE(result == 0);
	}
}

TEST_CASE("Chip8Memory/readByte") {
	Chip8Memory obj;

	SECTION("out of bounds, should return 0") {
		// fill memory with 0x1F
		for (int i = 0; i < Chip8MemorySize; ++i) {
			obj.writeByte(i, 0x1F);
		}

		// execute
		u8 result = obj.readByte(Chip8MemorySize);

		// assert
		REQUIRE(result == 0);
	}
<commit_msg>removed superfluous assertions when testing constructor. Just assert that the first and last bytes are zero.<commit_after>
#include "catch.hpp"
#include "Chip8Memory.hpp"
#include <iostream>

TEST_CASE("Chip8Memory/constructor") {
	Chip8Memory obj;

	// assert that first and last memory
	//   location are set to zero
	REQUIRE(obj.readByte(0) == 0);
	REQUIRE(obj.readByte(Chip8MemorySize - 1) == 0);
}

TEST_CASE("Chip8Memory/readByte") {
	Chip8Memory obj;

	SECTION("out of bounds, should return 0") {
		// fill memory with 0x1F
		for (int i = 0; i < Chip8MemorySize; ++i) {
			obj.writeByte(i, 0x1F);
		}

		// execute
		u8 result = obj.readByte(Chip8MemorySize);

		// assert
		REQUIRE(result == 0);
	}

{'fraction_non_alphanumeric': 0.13926042486231313, 'fraction_numerical': 0.03068450039339103, 'mean_word_length': 3.8735632183908044, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '942847', 'n_tokens_mistral': 525, 'n_tokens_neox': 470, 'n_words': 121}