niffy
niffy copied to clipboard
NIF testing harness
As discussed, this currently fails. I'm working on a fix which will most likely be about adding an `owned` bool member to the ErlNifBinary struct.
These map 1:1 to pthread.
Best thing to do would probably be to use something like [theft](https://github.com/silentbicycle/theft) and generate arbitrary terms.
I knew I needed to do it, but kept cutting corners. Haste makes waste etc.
Right now in an expression like `` we ignore the `:32/float` but obviously many programs would like to be able to check against relatively-more-expressive binaries, so we should fix that.
We should do a really dumb and simple map implementation; for example, JSON NIFs are increasingly using maps.
Might be a good guideline for how much of the API actually works.