Skip to content

Commit 9b54464

Browse files
committed
add missing test for DATA_LIST_CONST
1 parent 58bb875 commit 9b54464

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

capnpc/test/test.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,12 @@ mod tests {
11811181
assert_eq!(text_list.get(1).unwrap(), "xyzzy");
11821182
assert_eq!(text_list.get(2).unwrap(), "thud");
11831183

1184-
// TODO: DATA_LIST_CONST
1184+
let data_list_const = test_constants::DATA_LIST_CONST;
1185+
let data_list = data_list_const.get().unwrap();
1186+
assert_eq!(data_list.len(), 3);
1187+
assert_eq!(data_list.get(0).unwrap(), b"oops");
1188+
assert_eq!(data_list.get(1).unwrap(), b"exhausted");
1189+
assert_eq!(data_list.get(2).unwrap(), b"rfc3092");
11851190

11861191
let struct_list_const = test_constants::STRUCT_LIST_CONST;
11871192
let struct_list = struct_list_const.get().unwrap();

0 commit comments

Comments
 (0)