move tests to unit_tests to clean up individual files
adds start of font characters
This commit is contained in:
@@ -48,11 +48,9 @@ fn level2_test() {
|
||||
let mut x = Chip8Computer::new();
|
||||
// Load the IBM rom and run it.
|
||||
// it takes 39 cycles to get to the end so lets run it 40.
|
||||
|
||||
let test_rom_to_run = load_rom("2-ibm-logo.ch8");
|
||||
x.load_bytes_to_memory(0x200, (&test_rom_to_run).into());
|
||||
|
||||
for i in 0..40 {
|
||||
for _ in 0..40 {
|
||||
x.step_system();
|
||||
}
|
||||
// ...then verify that the current video memory of the chip-8
|
||||
@@ -79,12 +77,12 @@ fn level3_test() {
|
||||
fn rps_test() {
|
||||
let mut x = Chip8Computer::new();
|
||||
x.load_bytes_to_memory(0x200, &load_rom("RPS.ch8").into());
|
||||
for i in 0..0xF0 {
|
||||
for _ in 0..0xF0 {
|
||||
x.step_system();
|
||||
}
|
||||
assert_eq!(x.dump_video_to_string(), load_result("gemma_integration_rps_stage1.asc"));
|
||||
x.keypad.push_key(0x01);
|
||||
for i in 0..0x200 {
|
||||
for _ in 0..0x200 {
|
||||
x.step_system();
|
||||
}
|
||||
assert_eq!(x.dump_video_to_string(), load_result("gemma_integration_rps_stage2.asc"));
|
||||
@@ -95,7 +93,7 @@ fn level4_test() {
|
||||
// flags
|
||||
let mut x = Chip8Computer::new();
|
||||
x.load_bytes_to_memory(0x200, &load_rom("4-flags.ch8").into());
|
||||
for i in 0..0x400 {
|
||||
for _ in 0..0x400 {
|
||||
x.step_system();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user