From 83cc35c9683d966b7d81368bf6303b5738895f36 Mon Sep 17 00:00:00 2001 From: John Breaux Date: Sun, 2 Apr 2023 14:45:32 -0500 Subject: [PATCH] Move submodules to project root --- .gitmodules | 6 +++--- tests/chip8-test-suite => chip8-test-suite | 0 src/cpu/tests.rs | 2 +- tests/chip8_test_suite.rs | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) rename tests/chip8-test-suite => chip8-test-suite (100%) diff --git a/.gitmodules b/.gitmodules index c2f8f36..41267b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "tests/chip8-test-suite"] - path = tests/chip8-test-suite +[submodule "chip8-test-suite"] + path = chip8-test-suite url = https://github.com/Timendus/chip8-test-suite.git [submodule "chip8Archive"] path = chip8Archive - url = https://github.com/JohnEarnest/chip8Archive.git + url = https://github.com/JohnEarnest/chip8Archive.git \ No newline at end of file diff --git a/tests/chip8-test-suite b/chip8-test-suite similarity index 100% rename from tests/chip8-test-suite rename to chip8-test-suite diff --git a/src/cpu/tests.rs b/src/cpu/tests.rs index 630e02d..1f5157b 100644 --- a/src/cpu/tests.rs +++ b/src/cpu/tests.rs @@ -37,7 +37,7 @@ fn setup_environment() -> (CPU, Bus) { // Load the ROM file into RAM (dummy binary which contains nothing but `jmp pc+2`) Program [0x0200..0x1000] = include_bytes!("tests/roms/jumptest.ch8"), // Create a screen - Screen [0x0F00..0x1000] = include_bytes!("../../tests/chip8Archive/roms/1dcell.ch8"), + Screen [0x0F00..0x1000] = include_bytes!("../../chip8Archive/roms/1dcell.ch8"), }, ) } diff --git a/tests/chip8_test_suite.rs b/tests/chip8_test_suite.rs index 5310c7d..b7a11aa 100644 --- a/tests/chip8_test_suite.rs +++ b/tests/chip8_test_suite.rs @@ -16,9 +16,9 @@ fn setup_environment() -> (CPU, Bus) { // Load the charset into ROM Charset [0x0050..0x00A0] = include_bytes!("../src/mem/charset.bin"), // Load the ROM file into RAM - Program [0x0200..0x1000] = include_bytes!("../chip-8/BC_test.ch8"), - // Create a screen - Screen [0x0F00..0x1000] = include_bytes!("../chip-8/IBM Logo.ch8"), + Program [0x0200..0x1000] = include_bytes!("../chip8-test-suite/bin/chip8-test-suite.ch8"), + // Create a screen, and fill it with garbage data + Screen [0x0F00..0x1000] = include_bytes!("chip8_test_suite.rs"), }, ) } @@ -45,14 +45,14 @@ fn run_screentest(test: SuiteTest, mut cpu: CPU, mut bus: Bus) { #[test] fn splash_screen() { - let (c, b) = setup_environment(); + let (cpu, bus) = setup_environment(); run_screentest( SuiteTest { program: include_bytes!("chip8-test-suite/bin/chip8-test-suite.ch8"), screen: include_bytes!("screens/chip8-test-suite/splash.bin"), }, - c, - b, + cpu, + bus, ) }