use for loop in unit test
This commit is contained in:
parent
540a91878c
commit
1ead550d13
1 changed files with 10 additions and 1 deletions
|
|
@ -51,5 +51,14 @@ fn test_main_memory() {
|
||||||
dbg!(sim.read(sim.io().read_data)); // dbg! macro just displays the value you pass to it
|
dbg!(sim.read(sim.io().read_data)); // dbg! macro just displays the value you pass to it
|
||||||
|
|
||||||
|
|
||||||
|
for n in 0u64..4u64 {
|
||||||
|
sim.write(sim.io().addr, n);
|
||||||
|
// now wait 1us because why not
|
||||||
|
sim.advance_time(SimDuration::from_micros(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sim.flush_traces().unwrap(); // make sure everything is written to the output file
|
sim.flush_traces().unwrap(); // make sure everything is written to the output file
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue