martinmoene / lest

A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant)
Boost Software License 1.0
390 stars 45 forks source link

Compilers warnings #18

Closed coin-au-carre closed 9 years ago

coin-au-carre commented 9 years ago

Just to notice some compilers warning when using the -Wall flag with Clang 3.7 :

warning: suggest braces around initialization of subobject [-Wmissing-braces] CASE("test") lest.hpp:115:5: note: expanded from macro 'lest_CASE' proposition, [VA_ARGS](lest::env & $)

and with the -pedantic flag GCC 5.2 tells :

warning: ISO C++11 requires at least one argument for the "..." in a variadic macro CASE("test")

with the -pedantic flag Clang says lots of warnings of the type :

lest.hpp:172:27: warning: '$' in identifier [-Wdollar-in-identifier-extension] lest::report( $.os, lest::got_none( lest_LOCATION, #expr ), $.testing ); \

We also get some warnings with Weffc++ flag

Thank you for this work I really enjoy it !

martinmoene commented 9 years ago

Resolved by pr #19.