CLEANUP: cleans up dependencies to use workspace version
CLEANUP: standardizes on pretty_env_logger NEWBIN: Adds gemmarat to use Ratatui as an interface CLEANUP: removes debugging display from computer.rs ENHANCEMENT: Constants for locations of test roms built from environment BUGFIX: SoundTimer was using i32 internally when it needs to be u8 CLEANUP: removes commented code used during diagnostics
This commit is contained in:
@@ -6,7 +6,7 @@ use gemma::chip8::computer_manager::Chip8ComputerManager;
|
||||
use gemma::chip8::quirk_modes::QuirkMode;
|
||||
use gemma::chip8::quirk_modes::QuirkMode::{Chip8, SChipModern, XOChip};
|
||||
use gemma::chip8::registers::Chip8Registers;
|
||||
use gemma::constants::{CHIP8_VIDEO_MEMORY, TESTS_ROOT};
|
||||
use gemma::constants::{CHIP8_VIDEO_MEMORY, TESTS_ROOT, TEST_ROM_ROOT};
|
||||
use crate::test_utils::{load_compressed_result, load_result, load_rom};
|
||||
|
||||
#[test]
|
||||
@@ -187,7 +187,7 @@ fn quirks_mode_test() {
|
||||
fn load_rom_allows_starting() {
|
||||
let mut new_manager = Chip8ComputerManager::default();
|
||||
assert!(!new_manager.core_should_run);
|
||||
let p = format!("{}/../resources/test/roms/1-chip8-logo.ch8" , std::env::current_dir().unwrap().display());
|
||||
let p = TEST_ROM_ROOT.to_string() + "/1-chip8-logo.ch8";
|
||||
let full_path = Path::new(p.as_str());
|
||||
new_manager.load_new_program_from_disk_to_system_memory(full_path);
|
||||
assert!(new_manager.core_should_run)
|
||||
|
||||
@@ -11,20 +11,6 @@ fn load_result(to_load: &str) -> String {
|
||||
std::fs::read_to_string(full_path).unwrap()
|
||||
}
|
||||
|
||||
// fn load_compressed_result(file_path: &str) -> io::Result<String> {
|
||||
// // Load the compressed file contents
|
||||
// let compressed_data = fs::read(file_path)?;
|
||||
//
|
||||
// // Create a GzDecoder to uncompress the data
|
||||
// let mut decoder = GzDecoder::new(&mut compressed_data[..]);
|
||||
// let mut decompressed_data = String::new();
|
||||
//
|
||||
// // Read the decompressed data directly into a String
|
||||
// decoder.read_to_string(&mut decompressed_data)?;
|
||||
//
|
||||
// Ok(decompressed_data)
|
||||
// }
|
||||
|
||||
fn load_rom(to_load: &str) -> Vec<u8> {
|
||||
fs::read(format!("resources/test/roms/{}", to_load)).unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user