Skip to content

Commit 1a4374d

Browse files
committed
done
1 parent fa1647a commit 1a4374d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tests/test_table_traits.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,29 @@ fn validate_output_from_treeseq(treeseq: tskit::TreeSequence) {
144144
assert_eq!(treeseq_output, access_output);
145145
let iteration_output = IteratorOutput::new_from_table_iteration(&treeseq);
146146
assert_eq!(treeseq_output, iteration_output);
147+
let impl_syntax_output = IteratorOutput::new_from_table_access_impl_syntax(&treeseq);
148+
assert_eq!(treeseq_output, impl_syntax_output);
147149
let boxed = Box::new(treeseq);
148150
let dynamic_output = IteratorOutput::new_from_dyn(&boxed);
149151
assert_eq!(treeseq_output, dynamic_output);
150-
todo!("test impl syntax")
152+
let impl_syntax_output = IteratorOutput::new_from_table_access_impl_syntax(boxed);
153+
assert_eq!(treeseq_output, impl_syntax_output);
151154
}
152155

153156
fn validate_output_from_treeseq_ref(treeseq: tskit::TreeSequence) {
154-
todo!()
157+
let treeseq_ref = &treeseq;
158+
let treeseq_output = IteratorOutput::new_from_treeseq(treeseq_ref);
159+
let access_output = IteratorOutput::new_from_table_access(treeseq_ref);
160+
assert_eq!(treeseq_output, access_output);
161+
let iteration_output = IteratorOutput::new_from_table_iteration(treeseq_ref);
162+
assert_eq!(treeseq_output, iteration_output);
163+
let impl_syntax_output = IteratorOutput::new_from_table_access_impl_syntax(treeseq_ref);
164+
assert_eq!(treeseq_output, impl_syntax_output);
165+
let boxed = Box::new(treeseq_ref);
166+
let dynamic_output = IteratorOutput::new_from_dyn(&boxed);
167+
assert_eq!(treeseq_output, dynamic_output);
168+
let impl_syntax_output = IteratorOutput::new_from_table_access_impl_syntax(boxed);
169+
assert_eq!(treeseq_output, impl_syntax_output);
155170
}
156171

157172
fn make_tables() -> tskit::TableCollection {

0 commit comments

Comments
 (0)