From 362ca77ba041a2b16bd6c89cf346f00e9a437051 Mon Sep 17 00:00:00 2001 From: sergey-shandar Date: Sun, 3 Mar 2024 14:47:21 -0800 Subject: [PATCH] eq --- blockset-lib/src/info/node_type_set.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockset-lib/src/info/node_type_set.rs b/blockset-lib/src/info/node_type_set.rs index 47f869a2..df6f6f4c 100644 --- a/blockset-lib/src/info/node_type_set.rs +++ b/blockset-lib/src/info/node_type_set.rs @@ -38,11 +38,13 @@ mod test { y: NodeType, union: fn(NodeTypeSet, NodeTypeSet) -> NodeTypeSet, intersection: fn(NodeTypeSet, NodeTypeSet) -> NodeTypeSet, + eq: fn(NodeTypeSet, NodeTypeSet) -> bool, ) { let xi = 1 << x as u8; let yi = 1 << y as u8; let xs = NodeTypeSet::new(x); let ys = NodeTypeSet::new(y); + assert!(eq(xs, xs)); assert_eq!(union(xs, ys).0, xi | yi); assert_eq!(intersection(xs, ys).0, xi & yi); }