imb / fctx

C unit testing in a header (works for C++ too!).
Other
36 stars 15 forks source link

gcc runs out of memory with 1024 tests in release #1

Open imb opened 14 years ago

imb commented 14 years ago

When trying to compile the test_big, with 1024 tests cases, using gcc with release flags, my system runs out of memory. The debug build proceeds happily.

I can only speculate that the release optimizer can not handle a single "function" with 1024 test cases within it, because this is what test_big looks like.

At the moment the test was modified to only generate 256 tests in release. The number was picked out of the air, and was not precisely generated.

A workaround is not to let your test suites get this large, and to break up your tests either with different EXE's or with the FCTMF (FCTX Multi-file API).