mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
arch migrations make PDDB_LEN harder to reach in modals
this constant was just used to create a "realistic" test case instead of trying to add the dependency we just hard-code the constant into the test case, because in the end what we wanted was that specific constant to test a specific edge case of a progress bar.
This commit is contained in:
parent
42c6417e46
commit
ee6fb3ef4f
1 changed files with 3 additions and 7 deletions
|
|
@ -11,6 +11,7 @@ use xous_names::XousNames;
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
const RADIO_TEST: [&'static str; 4] = ["zebra", "cow", "horse", "cat"];
|
const RADIO_TEST: [&'static str; 4] = ["zebra", "cow", "horse", "cat"];
|
||||||
|
const TEST_LOC: u32 = 0x01D8_0000; // this is PDDB_LOC from the precursor hardware config, chosen for "accurate" test case
|
||||||
|
|
||||||
const CHECKBOX_TEST: [&'static str; 5] =
|
const CHECKBOX_TEST: [&'static str; 5] =
|
||||||
["happy", "😃", "安", "peace &\n tranquility", "Once apon a time, in a land far far away, there was a"];
|
["happy", "😃", "安", "peace &\n tranquility", "Once apon a time, in a land far far away, there was a"];
|
||||||
|
|
@ -47,14 +48,9 @@ pub fn spawn_test() {
|
||||||
// The start and end items are deliberately structured to be not zero-indexed; the use of PDDB_LOC
|
// The start and end items are deliberately structured to be not zero-indexed; the use of PDDB_LOC
|
||||||
// is just a convenient global constant.
|
// is just a convenient global constant.
|
||||||
modals
|
modals
|
||||||
.start_progress(
|
.start_progress("Progress Quest", TEST_LOC, TEST_LOC + 64 * 1024 * 128, TEST_LOC)
|
||||||
"Progress Quest",
|
|
||||||
xous::PDDB_LOC,
|
|
||||||
xous::PDDB_LOC + 64 * 1024 * 128,
|
|
||||||
xous::PDDB_LOC,
|
|
||||||
)
|
|
||||||
.expect("couldn't raise progress bar");
|
.expect("couldn't raise progress bar");
|
||||||
for i in (xous::PDDB_LOC..xous::PDDB_LOC + 64 * 1024 * 128).step_by(64 * 1024 * 16) {
|
for i in (TEST_LOC..TEST_LOC + 64 * 1024 * 128).step_by(64 * 1024 * 16) {
|
||||||
modals.update_progress(i).expect("couldn't update progress bar");
|
modals.update_progress(i).expect("couldn't update progress bar");
|
||||||
tt.sleep_ms(100).unwrap();
|
tt.sleep_ms(100).unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue