mirror of https://github.com/sgoudham/bst-rs.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
413 B
Rust
18 lines
413 B
Rust
2 years ago
|
use bst_rs::bst;
|
||
|
|
||
|
#[test]
|
||
|
fn successfully_construct_bst_from_macro() {
|
||
|
let mut actual_bst = IterativeBST::new();
|
||
|
actual_bst.insert(3);
|
||
|
actual_bst.insert(2);
|
||
|
let expected_bst = bst![3,2];
|
||
|
assert_eq!(actual_bst, expected_bst);
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn verify_permutations_produce_same_tree() {
|
||
|
let expected_bst = bst![2,3];
|
||
|
let expected_bst = bst![3,2];
|
||
|
assert_eq!(actual_bst, expected_bst);
|
||
|
}
|