forked from Rativel/BurritOS
BurritOS now read configuration file
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user