Skip to content

Commit

Permalink
test: Remove unneeded tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xxuejie committed Aug 19, 2020
1 parent 6163b30 commit 59b076d
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions tests/test_aot.rs
Expand Up @@ -345,50 +345,14 @@ pub fn test_aot_flat_crash_64() {
assert_eq!(result.err(), Some(Error::OutOfBound));
}

#[test]
pub fn test_aot_write_at_boundary64() {
let mut file = File::open("tests/programs/write_at_boundary64").unwrap();
let mut buffer = Vec::new();
file.read_to_end(&mut buffer).unwrap();
let buffer: Bytes = buffer.into();

let mut aot_machine = AotCompilingMachine::load(&buffer, None, VERSION0).unwrap();
let code = aot_machine.compile().unwrap();
let mut machine = AsmMachine::default_with_aot_code(&code);
machine
.load_program(&buffer, &vec!["write_at_boundary64".into()])
.unwrap();
let result = machine.run();
assert!(result.is_ok());
assert_eq!(result.unwrap(), 0);
}

#[test]
pub fn test_aot_read_at_boundary64() {
let mut file = File::open("tests/programs/read_at_boundary64").unwrap();
let mut buffer = Vec::new();
file.read_to_end(&mut buffer).unwrap();
let buffer: Bytes = buffer.into();

let mut aot_machine = AotCompilingMachine::load(&buffer, None, VERSION0).unwrap();
let code = aot_machine.compile().unwrap();
let mut machine = AsmMachine::default_with_aot_code(&code);
machine
.load_program(&buffer, &vec!["read_at_boundary64".into()])
.unwrap();
let result = machine.run();
assert!(result.is_ok());
assert_eq!(result.unwrap(), 0);
}

#[test]
pub fn test_aot_alloc_many() {
let mut file = File::open("tests/programs/alloc_many").unwrap();
let mut buffer = Vec::new();
file.read_to_end(&mut buffer).unwrap();
let buffer: Bytes = buffer.into();

let mut aot_machine = AotCompilingMachine::load(&buffer, None).unwrap();
let mut aot_machine = AotCompilingMachine::load(&buffer, None, VERSION0).unwrap();
let code = aot_machine.compile().unwrap();
let mut machine = AsmMachine::default_with_aot_code(&code);
machine
Expand Down

0 comments on commit 59b076d

Please sign in to comment.