From e65ccf4ec79f54aa66d4b98bde63ea2f1f97ec99 Mon Sep 17 00:00:00 2001 From: Mark Poliakov Date: Tue, 3 Oct 2023 11:36:35 +0300 Subject: [PATCH] aml: Fix tests not building with IndexField --- aml/src/test_utils.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aml/src/test_utils.rs b/aml/src/test_utils.rs index e061687..cda6d94 100644 --- a/aml/src/test_utils.rs +++ b/aml/src/test_utils.rs @@ -158,6 +158,18 @@ pub(crate) fn crudely_cmp_values(a: &AmlValue, b: &AmlValue) -> bool { } _ => false, }, + AmlValue::IndexField { index, data, flags, offset, length } => match b { + AmlValue::IndexField { + index: b_index, + data: b_data, + flags: b_flags, + offset: b_offset, + length: b_length, + } => { + index == b_index && data == b_data && flags == b_flags && offset == b_offset && length == b_length + } + _ => false, + }, AmlValue::Device => match b { AmlValue::Device => true, _ => false,