diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-10-20 21:21:12 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-10-29 09:18:21 +0100 |
commit | 11e09a440b9b4e80878dc685f9d49d8a43ff6604 (patch) | |
tree | af4183cc1d809e90477b667dcfa16880111cbaab /tests | |
parent | 38c2e3d1049f494529cb9876bcd564ec20ba512c (diff) |
tst_qvariant: automate testing of forward_list
...using the SD-6 __has_include macro.
Change-Id: I629e2ad1c8090aba9e86ab9febf6d09a504219f9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 4264c96745..41a6de214a 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3798,11 +3798,10 @@ struct ContainerAPI<Container, QByteArray> } }; -// We have no built-in defines to check the stdlib features. -// #define TEST_FORWARD_LIST - -#ifdef TEST_FORWARD_LIST -#include <forward_list> +#ifdef __has_include +# if __has_include(<forward_list>) +# define TEST_FORWARD_LIST +# include <forward_list> Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(std::forward_list) @@ -3856,7 +3855,8 @@ struct ContainerAPI<std::forward_list<QString> > return variant == value; } }; -#endif +# endif // __has_include(<forward_list>) +#endif // __has_include template<typename Container> struct KeyGetter |