@@ -63,8 +63,7 @@ impl IteratorOutput {
63
63
}
64
64
}
65
65
66
- fn new_from_table_access_impl_syntax ( access : impl tskit:: TableAccess ) -> Self
67
- {
66
+ fn new_from_table_access_impl_syntax ( access : impl tskit:: TableAccess ) -> Self {
68
67
Self :: new_from_table_access ( & access)
69
68
}
70
69
@@ -112,9 +111,15 @@ fn validate_output_from_tables(tables: tskit::TableCollection) {
112
111
assert_eq ! ( tables_output, access_output) ;
113
112
let iteration_output = IteratorOutput :: new_from_table_iteration ( & tables) ;
114
113
assert_eq ! ( tables_output, iteration_output) ;
114
+ let impl_syntax_output = IteratorOutput :: new_from_table_access_impl_syntax ( & tables) ;
115
+ assert_eq ! ( tables_output, impl_syntax_output) ;
115
116
let boxed = Box :: new ( tables) ;
116
117
let dynamic_output = IteratorOutput :: new_from_dyn ( & boxed) ;
117
118
assert_eq ! ( tables_output, dynamic_output) ;
119
+ let impl_syntax_output = IteratorOutput :: new_from_table_access_impl_syntax ( & boxed) ;
120
+ assert_eq ! ( tables_output, impl_syntax_output) ;
121
+ let impl_syntax_output = IteratorOutput :: new_from_table_access_impl_syntax ( boxed) ;
122
+ assert_eq ! ( tables_output, impl_syntax_output) ;
118
123
}
119
124
120
125
fn validate_output_from_table_ref ( tables : tskit:: TableCollection ) {
@@ -142,6 +147,11 @@ fn validate_output_from_treeseq(treeseq: tskit::TreeSequence) {
142
147
let boxed = Box :: new ( treeseq) ;
143
148
let dynamic_output = IteratorOutput :: new_from_dyn ( & boxed) ;
144
149
assert_eq ! ( treeseq_output, dynamic_output) ;
150
+ todo ! ( "test impl syntax" )
151
+ }
152
+
153
+ fn validate_output_from_treeseq_ref ( treeseq : tskit:: TreeSequence ) {
154
+ todo ! ( )
145
155
}
146
156
147
157
fn make_tables ( ) -> tskit:: TableCollection {
@@ -186,3 +196,14 @@ fn test_traits_with_tree_sequence() {
186
196
let treeseq = tskit:: TreeSequence :: try_from ( tables) . unwrap ( ) ;
187
197
validate_output_from_treeseq ( treeseq)
188
198
}
199
+
200
+ #[ test]
201
+ fn test_traits_with_tree_sequence_ref ( ) {
202
+ let mut tables = make_tables ( ) ;
203
+ tables
204
+ . full_sort ( tskit:: TableSortOptions :: default ( ) )
205
+ . unwrap ( ) ;
206
+ tables. build_index ( ) . unwrap ( ) ;
207
+ let treeseq = tskit:: TreeSequence :: try_from ( tables) . unwrap ( ) ;
208
+ validate_output_from_treeseq_ref ( treeseq)
209
+ }
0 commit comments