Skip to content

Commit c1836ab

Browse files
committed
Add basic unit test for num_tap_leaves
In preparation for modifying the `num_tap_leaves` function add a basic unit test.
1 parent bdf6ecc commit c1836ab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/policy/concrete.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,4 +1245,11 @@ mod tests {
12451245

12461246
assert_eq!(got, want);
12471247
}
1248+
1249+
#[test]
1250+
#[cfg(feature = "compiler")]
1251+
fn num_tap_leaves() {
1252+
let policy = Policy::<String>::from_str("or(and(pk(A),pk(B)),pk(C))").unwrap();
1253+
assert_eq!(policy.num_tap_leaves(), 2);
1254+
}
12481255
}

0 commit comments

Comments
 (0)