turtle icon indicating copy to clipboard operation
turtle copied to clipboard

Remove defined1/2.cpp

Open Flamefire opened this issue 5 years ago • 2 comments

What is the purpose of the empty files defined1/2.cpp and defined.hpp?

They get compiled for each test (there are >100 tests) and slow down the test/build considerably

Remove them?

Similar for undefined: It is only used in 1 test but needlessly compiled for all. Only compile for that 1 test?

Flamefire avatar Dec 22 '19 17:12 Flamefire

If you look at the history for these files I believe it explains what they intend to test:

  • defined.hpp: https://github.com/mat007/turtle/commit/86371b56956163bf6f27aa2a708c6abe28b1b1bb#diff-4c70002b08ea2c82a0da9f4652b43c4d
  • undefined.hpp: https://github.com/mat007/turtle/commit/c697b488023fb42165cb2c8a638d65243997a1e9#diff-654c393c98f706d42ec3171d329e5f8d

I would be a bit reluctant to just remove them as they’re safeguards against possible regressions.

mat007 avatar Dec 22 '19 18:12 mat007

Ah ok. Then how about creating a test that consists of defined1/2.cpp and only links them together (tests the "multiple inclusion issue") and adding the undefined.cpp only to the 2 tests using it? This would avoid the 300 needless compilations... With MSVC this takes a lot of time :/

Flamefire avatar Dec 22 '19 18:12 Flamefire