Closed furkanusta closed 7 years ago
Hi @furkanusta,
The contrib files are not necessary for normal usage of lest, in fact I'm not sure if what's in there now is a good idea at all.
The examples that fail, do so to demonstrate the usage of things, for example:
example>"04-c++03.exe" --pass
04-c++03.cpp:33: passed: character: a() < b() for 'a' < 'b'
04-c++03.cpp:34: failed: character: b() < a() for 'b' < 'a'
04-c++03.cpp:39: passed: integral: x() != y() for 3 != 7
04-c++03.cpp:40: failed: integral: x() == y() for 3 == 7
04-c++03.cpp:45: passed: real: pi() != e() for 3.14 != 2.72
04-c++03.cpp:46: failed: real: pi() != pi() for 3.14 != 3.14
04-c++03.cpp:51: passed: mixed real, integral: pi() != x() for 3.14 != 3
04-c++03.cpp:52: failed: mixed real, integral: pi() == x() for 3.14 == 3
04-c++03.cpp:57: passed: mixed integral, real: x() != pi() for 3 != 3.14
04-c++03.cpp:58: failed: mixed integral, real: x() == pi() for 3 == 3.14
04-c++03.cpp:63: passed: boolean: t() == t() for true == true
04-c++03.cpp:64: failed: boolean: t() == f() for true == false
04-c++03.cpp:73: passed: pointer: ptr() == (void*)NULL for 0 == 0
04-c++03.cpp:74: failed: pointer: ptr() != (void*)NULL for 0 != 0
04-c++03.cpp:81: passed: class object pointer: &a == &a for 0x75f3f7 == 0x75f3f7
04-c++03.cpp:82: failed: class object pointer: &a == &b for 0x75f3f7 == 0x75f3f6
04-c++03.cpp:87: passed: std::string: std_world > std_hello for "world" > "hello"
04-c++03.cpp:88: failed: std::string: std_world < std_hello for "world" < "hello"
04-c++03.cpp:93: passed: C-string: world > std_hello for "world" > "hello"
04-c++03.cpp:94: failed: C-string: world < std_hello for "world" < "hello"
04-c++03.cpp:100: passed: single evaluation: 1 == ++n for 1 == 1
04-c++03.cpp:106: failed: duplicate evaluation: 2 == ++n for 2 == 1
11 out of 12 selected tests failed.
What counts for lest's usage is that the tests in folder test
do pass and it looks like they do in your case and you're doing it right.
Hope this helps, Martin
Thanks for the response.
So, if I am not going to use contrib functionality, then it doesn't matter if those tests fail? and, I don't know CMake much but it might be better to put contrib as a submodule and enable it via a flag or something like that.
Indeed looks like a good idea to disable contrib ate default. CMake does provide facilities for that and I'll add that. Thanks!
Handled in issue #40.
Hi, I've just cloned the library and tried to run make test, but by default it builds contrib files and in lest_expect_abort.hpp there is header included and it is missing in my system.
I am using gcc 6.2.1 in Fedora 24.
And if I comment add_subdirectory(contrib) line in CMakeFiles, I get
I am not sure if contrib files are necessary, or am I doing some kind of mistake.