bernedom / SI

A header only C++ library that provides type safety and user defined literals for physical units
https://si.dominikberner.ch/doc/
MIT License
488 stars 40 forks source link

testing out of the box #57

Closed GregKon closed 4 years ago

GregKon commented 4 years ago

Is your feature request related to a problem? Please describe.

Dear

I would like test your library, however I have problem with run unit tests "out of the box". I think the instructions: mkdir build cd build cmake .. cmake --build . --config Debug -- -j $(nproc)

does not cover unit tests because unit test are not build.

  1. Did I missed understand something? (I use cmake 3.17 VS2017, gcc 9.2, windows host)
  2. I also do not understand installing instruction since it is header library.

/Greg

bernedom commented 4 years ago

Testing for SI requires https://conan.io/ for retrieving the catch2 unit testing framework. If conan is not installed the tests are not built. Watch out for a warning saying: "Conan not found. Skipping tests"

I'm considering changing that so it tries to get catch2 first and only falls back to conan if not found.

Does this answer your question?

GregKon commented 4 years ago

Hi Indeed, there was such message but I have missed it becouse it just warning and it was lost in lines of standard cmake output. Overall cmake finish with success. Start building silently finish as well.

I suggest some kind of information about that. Or for example: make sure you have conan installed and in path. (proparbly most users will be install by pip. so as example meyby istruction how to instal by pip?)

Test runs and I will evaluate your library and later on back with feedback.