fixing builds
- silencing gcc/clang warnings
- seems that some compiler versions handle the type lists differently (different order) so I extracted the templated test case with a stringified user type to a separate test case template with just 1 type in it's list
diff --git a/examples/all_features/templated_test_cases.cpp b/examples/all_features/templated_test_cases.cpp
index c20a4ea..59a52e8 100644
--- a/examples/all_features/templated_test_cases.cpp
+++ b/examples/all_features/templated_test_cases.cpp
@@ -4,7 +4,7 @@
// typedefs are required if variadic macro support is not available (otherwise the commas are a problem)
typedef doctest::Types<char, short, int> int_types;
-typedef doctest::Types<float, double> float_types;
+typedef doctest::Types<float, double, float> float_types; // note that types won't be filtered for uniqueness
// =================================================================================================
// NORMAL TEMPLATED TEST CASES
@@ -53,12 +53,6 @@
TypePair<bool, int>
> pairs;
-
-// if variadic macros are supported then "TypePair<bool, int>" can be passed directly to the macro (otherwise the commas are a problem)
-// currently result will be "bool_int_pair" instead of "TypePair<bool, int>" because of the way the type stringification works
-typedef TypePair<bool, int> bool_int_pair;
-TYPE_TO_STRING(bool_int_pair);
-
TEST_CASE_TEMPLATE("multiple types", T, pairs) {
typedef typename T::A T1;
typedef typename T::B T2;
@@ -66,3 +60,16 @@
CHECK(T1() == T1());
CHECK(T2() != T2());
}
+
+// if variadic macros are supported then "TypePair<int, int>" can be passed directly to the macro (otherwise the commas are a problem)
+// currently the string result will be "int_pair" instead of "TypePair<int, int>" because of the way the type stringification works
+typedef TypePair<int, int> int_pair;
+TYPE_TO_STRING(int_pair);
+
+TEST_CASE_TEMPLATE("bad stringification of type pair", T, doctest::Types<int_pair>) {
+ typedef typename T::A T1;
+ typedef typename T::B T2;
+ // use T1 and T2 types
+ CHECK(T1() == T1());
+ CHECK(T2() != T2());
+}