Skip to content

Commit feb147c

Browse files
committed
add test: string parsing emulation
1 parent 5627fa6 commit feb147c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/libmwemu/src/tests/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ mod test_unified_step_and_run_methods;
4848
mod call32;
4949
mod call64;
5050
mod linux_call64;
51+
mod sc64win_strgen;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use crate::tests::helpers;
2+
use crate::*;
3+
4+
#[test]
5+
// build string: cargo run --release -- -6 -f test/sc64lin_strgen.bin -vv -c 232 -s 0x329ec8
6+
pub fn sc64win_strgen() {
7+
helpers::setup();
8+
9+
let mut emu = emu64();
10+
emu.set_verbose(3);
11+
emu.cfg.maps_folder = "../../maps/maps64/".to_string();
12+
emu.load_code("../../test/sc64win_strgen.bin");
13+
emu.run_to(231);
14+
let s = emu.maps.read_string(0x329ec8);
15+
assert_eq!(s, "http://something.com/");
16+
}

0 commit comments

Comments
 (0)