libOPNMIDI
libOPNMIDI copied to clipboard
Writing unit test with catch framework
I want to create unit tests for RT structures. User map, among things. Catch framework is difficult to work with because it a condensation of a lot of code in headers, requires lots of RAM.
Fortunately a person made very recently a minimal version for simple usage. link Do you mind switching to this version? After quick testing, RAM needs went down by 80%.
I think, that would be useful, let's keep both versions, but use mainly this, I'll put the header as catchmini.hpp
The mini version has two appreciable qualities from my side of things. 1) build faster 2) does not crash the computer by filling up memory.
After looking at the implemention of catch, I came to the conclusion there isn't possibility for separate compilation. The build tries to do all interprocedural optimizations and inlining, and just takes a lot of resources; to finish with a program of 5 times the size.
On memory overflow my computer gets be crazy: it goes to freeze EVERYTHING and does HARD write of swap, I hate this... and I hate "modern" software which uses lots of memory for nothing... I better to kill the process that tried malloc() and gets the memory overflow that do that freaking swap crap...
Yeah.. Maybe you know, but in linux you can enable a shortcut to invoke the oom killer, and get a chance to save your system if a crash is coming. (sysrq keys)
If I could do one thing to make computing better at a finger snap... Remove all Javascript. :smile:
Yeah.. Maybe you know, but in linux you can enable a shortcut to invoke the oom killer, and get a chance to save your system if a crash is coming. (sysrq keys)
Yeah, OOM Killer is that I needed, and yeah I better to crash a jerk-process than freeze the entire system :fox_face:
If I could do one thing to make computing better at a finger snap... Remove all Javascript. smile
That is totally right! :laughing:
I submitted a PR to the original catch project to make its build a lot more light and faster. Let's wait to see what happens.
I see you have closed it, because of build fail on Catch's CI... And I see some of macOS builds are was failed: https://travis-ci.org/catchorg/Catch2/builds/370003489
Oops :grin:, I had to press a wrong button... I don't want close this as issue is not completed
These CI build have not failed by my fault. I added 15 lines of cmake which are inconsequential to the normal build.
Yeah, I see the fault was because of mainstream-side crap: https://travis-ci.org/catchorg/Catch2/builds/369993994 (which is in fixing process)