Re:A tiling window manager written in Rust
by jherdman on Wednesday December 17, 2014 @01:50PM
(#8763615)
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?
[ Parent
| on HN ]
Re:A tiling window manager written in Rust
by codingbinary on Wednesday December 17, 2014 @01:58PM
(#8763665)
As 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.
Re:A tiling window manager written in Rust
by Heurtebise on Thursday December 18, 2014 @04:53PM
(#8769865)
> 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.