Skip to content

Commit b9506a1

Browse files
committed
wip: add payload iter tests - @todo finish them
1 parent af47caf commit b9506a1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

machine/src/device_tree.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,33 @@ impl<'a, 'i: 'a, 'dt: 'i> Iterator for PayloadPairsIter<'a, 'i, 'dt> {
213213
}
214214
}
215215

216+
#[cfg(test)]
217+
mod tests {
218+
use super::PayloadPairsIter;
219+
220+
const BUF: [u32; 4] = [0x0000_0000, 0x2000_0000, 0x4000_0000, 0x8000_0000];
221+
222+
#[test_case]
223+
fn parse_1_1_prop_correctly() {
224+
PayloadPairsIter
225+
}
226+
227+
#[test_case]
228+
fn parse_1_2_prop_correctly() {
229+
PayloadPairsIter
230+
}
231+
232+
#[test_case]
233+
fn parse_2_1_prop_correctly() {
234+
PayloadPairsIter
235+
}
236+
237+
#[test_case]
238+
fn parse_2_2_prop_correctly() {
239+
PayloadPairsIter
240+
}
241+
}
242+
216243
// See "2.2.3 Path Names" in DTSpec v0.3
217244
// This is based on https://lib.rs/dtb implementation (c) Simon Prykhodko, MIT license.
218245
struct PathSplit<'a> {

0 commit comments

Comments
 (0)