Skip to content

Commit 0f04e79

Browse files
committed
test: add with_config_table_compile_test
1 parent 5c449f1 commit 0f04e79

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

uefi/src/system.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,22 @@ where
146146

147147
f(stderr)
148148
}
149+
150+
#[cfg(test)]
151+
mod tests {
152+
use super::*;
153+
use crate::table::cfg::ACPI2_GUID;
154+
155+
#[test]
156+
fn with_config_table_compile_test() {
157+
let mut address_acpi2 = None;
158+
with_config_table(|slice| {
159+
for i in slice {
160+
match i.guid {
161+
ACPI2_GUID => address_acpi2 = Some(i.address),
162+
_ => {}
163+
}
164+
}
165+
});
166+
}
167+
}

0 commit comments

Comments
 (0)