Skip to content

Commit 3fc604a

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 b7f8939 commit 3fc604a

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

12261226
assert_eq!(got, want);
12271227
}
1228+
1229+
#[test]
1230+
#[cfg(feature = "compiler")]
1231+
fn num_tap_leaves() {
1232+
let policy = Policy::<String>::from_str("or(and(pk(A),pk(B)),pk(C))").unwrap();
1233+
assert_eq!(policy.num_tap_leaves(), 2);
1234+
}
12281235
}

0 commit comments

Comments
 (0)