3 ms·
My apologies if this is a really naive question, I don't really do this kind of low level systems programming. Do most projects of this sort not have tests, or
by jherdman 12y ago
My apologies if this is a really naive question, I don't really do this kind of low level systems programming. Do most projects of this sort not have tests, or are they just hard enough that they don't really pay off?
- deleted 12y ago[deleted]
- codingbinary 12y agoAs for the xlib stuff, I can't really write tests for that. But I will write a more extensive test suite for the core components, especially the ones in src/core.rs For the methods in window_manager.rs, they often depend on the window system, but that shouldn't be a problem as I could simply insert a dummy interface. Tests will follow. Last weeks were just filled with thesis and preparations for my last exam. So I used the coding for relaxation and kinda omitted the tests. I know, I know...behaviour.
- Heurtebise 12y ago> 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.