> As for the xlib stuff, I can't really write tests for that.
I do that by wrapping the C APIs into traits. I have some macros that generate both the proper implementations with ffi calls and mock implementations. Then I can write extensive tests for the high level binding's low level behavior using properly set up mocks.
Some people are susceptible for psychosis. LSD might give them the final push, turning them from the normal looking guy that sometimes say weird things to full-blown crazy.
I also know about a similar case in my social circle. An offbeat guy starts seeing demons after his first trip. Recovering in a mental institution ever since.
Yet I don't think LSD is to blame, it is just a trigger for a pre-existing underlying issue.
I do that by wrapping the C APIs into traits. I have some macros that generate both the proper implementations with ffi calls and mock implementations. Then I can write extensive tests for the high level binding's low level behavior using properly set up mocks.