Skip to content

Commit 051d63e

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 062e400 commit 051d63e

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
@@ -1246,4 +1246,11 @@ mod tests {
12461246

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

0 commit comments

Comments
 (0)