rusterlium / erlang_nif-sys

Low level bindings to Erlang NIF API for Rust
Apache License 2.0
90 stars 19 forks source link

Unsafe fn 2 #22

Closed jorendorff closed 7 years ago

jorendorff commented 7 years ago

There don't appear to be any tests for these, so I wrote one; but something bugs me about the behavior of the test I wrote. If you put a println! in rustmap and one in rustmap_destructor, you can see that they're each called 21 times. I think they should only be called 11 times. I couldn't figure it out.

goertzenator commented 7 years ago

The items in the simple_test_() list are supposed to be functions, but there was a direct execution of a test function in there. All fixed now along with a tested dtor counter.

jorendorff commented 7 years ago

Thank you!