File tree 4 files changed +33
-1
lines changed
4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,6 @@ fn main() {
53
53
// Write the bindings to the $OUT_DIR/bindings.rs file.
54
54
//let out_path = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
55
55
bindings
56
- . write_to_file ( "src/bindings .rs" )
56
+ . write_to_file ( "src/auto_bindings .rs" )
57
57
. expect ( "Couldn't write bindings!" ) ;
58
58
}
Original file line number Diff line number Diff line change
1
+ // re-export the auto-generate bindings
2
+ pub use crate :: auto_bindings:: * ;
3
+
4
+ // tskit defines this via a type cast
5
+ // in a macro. bindgen thus misses it.
6
+ // See bindgen issue 316.
7
+ pub const TSK_NULL : tsk_id_t = -1 ;
8
+
Original file line number Diff line number Diff line change 31
31
/// This module contains the same types/functions with the same names.
32
32
pub mod bindings;
33
33
34
+ mod auto_bindings;
35
+
34
36
// Testing modules
35
37
mod test_table_collection;
38
+ mod test_tsk_variables;
Original file line number Diff line number Diff line change
1
+ // These tests basically make sure that we
2
+ // can actually bind these things
3
+
4
+ #[ cfg( test) ]
5
+ mod tests
6
+ {
7
+ use crate :: * ;
8
+
9
+ #[ test]
10
+ fn test_node_is_sample ( )
11
+ {
12
+ let mut x = bindings:: TSK_NODE_IS_SAMPLE ;
13
+ assert ! ( x > 0 ) ;
14
+ }
15
+
16
+ #[ test]
17
+ fn test_tsk_null ( )
18
+ {
19
+ assert_eq ! ( bindings:: TSK_NULL , -1 ) ;
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments