1
0
forked from Rativel/BurritOS

BurritOS now read configuration file

This commit is contained in:
François Autin
2023-04-19 18:09:08 +02:00
parent 1c4c51b0ba
commit 73ac8d3083
9 changed files with 57 additions and 42 deletions

View File

@@ -584,12 +584,12 @@ fn get_address_point(instructions: &[u8], address: usize, is_32bits: bool) -> Op
/// It may not pass in the future if future gcc version modify order of the binary or something else
#[cfg(test)]
mod test {
use crate::simulator::{loader::{Loader, SectionHeader}, machine::Machine};
use crate::{simulator::{loader::{Loader, SectionHeader}, machine::Machine}, utility::cfg::get_debug_configuration};
#[test]
fn test_parse_elf() {
let mut machine = Machine::new(true);
let mut machine = Machine::new(true, get_debug_configuration());
let loader = Loader::load_and_parse("./target/guac/unsigned_addition.guac").expect("IO Error");
loader.load_into_machine(&mut machine, 0).expect("Parsing error");
assert!(!loader.elf_header.is_32bits);
@@ -610,7 +610,7 @@ mod test {
#[test]
fn test_parse_section() {
let mut machine = Machine::new(true);
let mut machine = Machine::new(true, get_debug_configuration());
let loader = Loader::load_and_parse("./target/guac/unsigned_addition.guac").expect("IO Error");
loader.load_into_machine(&mut machine, 0).expect("Parsing error");
assert_eq!(9, loader.sections.len());