update pip #49
git@b70b2c52489cd4dceb099e8162d05d5121b6e1a3
https://github.com/srz-zumix/iutest/commit/b70b2c52489cd4dceb099e8162d05d5121b6e1a3
fix cygwin build error #48
git@53fdf8aaeff67801be9262b4d335ce0f827a8a0e
workaround cygwin build error
git@52e201ccbc483d6c8953e66322263af1ae88f789
update google test version macro test make rule
git@803a610bbd4f67f7e42290b2fbc108abb858816f
fix: result is none
git@549ca73660549e09379cd238186bba87c0e66724
update gmock version decet
git@e31357a90c4762df34df3608f51157bafa01b016
fix cpplint
git@edae633d44066f1794630328fe3668104c0cdbac
update INSPECODE badge [ci skip]
git@54c05d6401c6346cd2ff0b337412a592875f2ec6
fix indent
git@a0719e3f1b36cceca5d7c0eec6dcbb2920b1bab2
add gtest version test
git@a1ca9d9a26844008c4c9943c0e539accdc64e86f
libc++ workaround #45
git@67fa082bb1f895d1e1fe5c96cc1dfa3069ddc535
add libc++ test
git@3216e8a0daefc872f50802f75b3e85d38cd4dee5
add libc++ test
git@c910c1bcf01693d6ad153f519f1a08140f491a08
add is_member_function_pointer compile error workaround #45
git@4f28a571c2032b5ddb6efba2970d577482b84a86
fix bug
git@9d88b8dfac075f8b949492793343b61f2e368c06
use clang 6.0
git@1fe84907a60ba84b827049974dcd0366d47b9eb6
@@ -11,10 +11,11 @@ | ||
11 | 11 | apt: &apt-global |
12 | 12 | sources: &apt-common-sources |
13 | 13 | - ubuntu-toolchain-r-test |
14 | - - llvm-toolchain-trusty-5.0 | |
14 | + - llvm-toolchain-trusty-6.0 | |
15 | 15 | - llvm-toolchain-trusty |
16 | 16 | packages: &apt-common-packages |
17 | - - clang-5.0 | |
17 | + - clang-6.0 | |
18 | + - libc++-dev | |
18 | 19 | - g++-7 |
19 | 20 | - gcc-7 |
20 | 21 | #- cppcheck |
@@ -81,7 +82,7 @@ | ||
81 | 82 | # clang |
82 | 83 | - | |
83 | 84 | if [ "${CXX}" = 'clang++' ]; then |
84 | - export CXX=clang++-5.0; | |
85 | + export CXX=clang++-6.0; | |
85 | 86 | fi |
86 | 87 | # mingw |
87 | 88 | - if [ "${MINGW}" = '1' ]; then export CXX=i686-w64-mingw32-g++; fi |
@@ -126,6 +127,11 @@ | ||
126 | 127 | |
127 | 128 | matrix: |
128 | 129 | include: |
130 | + # libc++ | |
131 | + - compiler: clang | |
132 | + env: | |
133 | + - STDFLAG=-stdlib=libc++ | |
134 | + - DEFS="-DIUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER=1" | |
129 | 135 | # coverage |
130 | 136 | - compiler: clang |
131 | 137 | env: USE_COVERAGE=gcov USE_CODECOV=1 USE_GNU_EXTENSION=1 |
@@ -9,7 +9,7 @@ | ||
9 | 9 | [![Bitrise Build Status](https://www.bitrise.io/app/a1525fe176d85f53/status.svg?token=C67enKOhen9rjw_Cl37ihA&branch=master)](https://www.bitrise.io/app/a1525fe176d85f53) |
10 | 10 | [![CircleCI](https://circleci.com/gh/srz-zumix/iutest/tree/master.svg?style=svg)](https://circleci.com/gh/srz-zumix/iutest/tree/master) |
11 | 11 | [![Scrutinizer Build Status](https://scrutinizer-ci.com/g/srz-zumix/iutest/badges/build.png?b=master)](https://scrutinizer-ci.com/g/srz-zumix/iutest/build-status/master) |
12 | -[![Job Status](https://inspecode.rocro.com/badges/github.com/srz-zumix/iutest/status?token=wt0KUnRUG1-Ul2mLrg8ComR1RznZV3VoXecBJHW0EIk)](https://inspecode.rocro.com/jobs/github.com/srz-zumix/iutest/latest?completed=true) | |
12 | +[![INSPECODE Job Status](https://inspecode.rocro.com/badges/github.com/srz-zumix/iutest/status?token=wt0KUnRUG1-Ul2mLrg8ComR1RznZV3VoXecBJHW0EIk&branch=master)](https://inspecode.rocro.com/jobs/github.com/srz-zumix/iutest/latest?completed=true&branch=master) | |
13 | 13 | [![Rocro INSPECODE Report](https://inspecode.rocro.com/badges/github.com/srz-zumix/iutest/report?token=wt0KUnRUG1-Ul2mLrg8ComR1RznZV3VoXecBJHW0EIk&branch=master)](https://inspecode.rocro.com/reports/github.com/srz-zumix/iutest/branch/master/summary) |
14 | 14 | [![Coverage Status](https://coveralls.io/repos/github/srz-zumix/iutest/badge.svg?branch=master)](https://coveralls.io/github/srz-zumix/iutest?branch=master) |
15 | 15 | [![codecov](https://codecov.io/gh/srz-zumix/iutest/branch/master/graph/badge.svg)](https://codecov.io/gh/srz-zumix/iutest) |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2014-2016, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2014-2018, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -32,7 +32,9 @@ | ||
32 | 32 | |
33 | 33 | //!< Minor Version |
34 | 34 | #ifndef GMOCK_MINORVER |
35 | -# if defined(GMOCK_GMOCK_MORE_MATCHERS_H_) | |
35 | +# if defined(GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_) | |
36 | +# define GMOCK_MINORVER 0x08 | |
37 | +# elif defined(GMOCK_GMOCK_MORE_MATCHERS_H_) | |
36 | 38 | # define GMOCK_MINORVER 0x07 |
37 | 39 | # else |
38 | 40 | // v1.6.0 以前は未対応 |
@@ -56,6 +58,10 @@ | ||
56 | 58 | ) //!< google test version |
57 | 59 | #endif |
58 | 60 | |
61 | +#if !defined(GMOCK_LATEST) | |
62 | +# define GMOCK_LATEST 0 //!< google test development latest version | |
59 | 63 | #endif |
60 | 64 | |
65 | +#endif | |
66 | + | |
61 | 67 | #endif // INCG_IRIS_IUTEST_GMOCK_VER_HPP_CBBF82C8_EB6F_4398_BAA6_5B485AC52D36_ |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2012-2017, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2012-2018, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -81,6 +81,10 @@ | ||
81 | 81 | ) //!< google test version |
82 | 82 | #endif |
83 | 83 | |
84 | +#if !defined(GTEST_LATEST) | |
85 | +# define GTEST_LATEST 0 //!< google test development latest version | |
84 | 86 | #endif |
85 | 87 | |
88 | +#endif | |
89 | + | |
86 | 90 | #endif // INCG_IRIS_IUTEST_GTEST_VER_HPP_7396AEF4_D1AB_44B5_9FE3_23CEC1240158_ |
@@ -53,6 +53,10 @@ | ||
53 | 53 | |
54 | 54 | #if IUTEST_HAS_HDR_TYPETARITS |
55 | 55 | # include <type_traits> |
56 | +#else | |
57 | +# if !defined(IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER) | |
58 | +# define IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER 1 | |
59 | +# endif | |
56 | 60 | #endif |
57 | 61 | |
58 | 62 | /** iutest type traits */ |
@@ -142,8 +146,11 @@ | ||
142 | 146 | typedef typename impl<T, void>::type type; |
143 | 147 | }; |
144 | 148 | |
149 | +#if defined(IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER) && IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER | |
150 | +template<typename T>struct is_member_function_pointer; | |
145 | 151 | #endif |
146 | 152 | |
153 | +#endif | |
147 | 154 | |
148 | 155 | #if IUTEST_HAS_HDR_TYPETARITS |
149 | 156 |
@@ -169,7 +176,9 @@ | ||
169 | 176 | struct add_rvalue_reference { typedef T type; }; |
170 | 177 | #endif |
171 | 178 | using ::std::is_function; |
179 | +#if !defined(IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER) || !IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER | |
172 | 180 | using ::std::is_member_function_pointer; |
181 | +#endif | |
173 | 182 | using ::std::is_member_pointer; |
174 | 183 | |
175 | 184 | template<typename F> |
@@ -689,6 +698,42 @@ | ||
689 | 698 | { |
690 | 699 | }; |
691 | 700 | |
701 | +namespace is_member_pointer_helper | |
702 | +{ | |
703 | + | |
704 | +/** @private */ | |
705 | +template<typename T> | |
706 | +class is_member_pointer | |
707 | +{ | |
708 | + template<typename U> | |
709 | + struct impl : public false_type {}; | |
710 | + template<typename U, typename C> | |
711 | + struct impl<U C::*> : public true_type {}; | |
712 | + | |
713 | +public: | |
714 | + typedef bool_constant< impl< typename remove_cv<T>::type >::value | |
715 | + || is_member_function_pointer<T>::value > type; | |
716 | +}; | |
717 | + | |
718 | +} // end of namespace is_member_pointer_helper | |
719 | + | |
720 | +/** | |
721 | + * @brief is member pointer | |
722 | +*/ | |
723 | +template<typename T> | |
724 | +struct is_member_pointer | |
725 | + : public is_member_pointer_helper::is_member_pointer<T>::type | |
726 | +{ | |
727 | +}; | |
728 | + | |
729 | +#endif // #if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) | |
730 | + | |
731 | +#endif // #if IUTEST_HAS_HDR_TYPETRAITS | |
732 | + | |
733 | +#if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) | |
734 | + | |
735 | +#if defined(IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER) && IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER | |
736 | + | |
692 | 737 | namespace is_member_function_pointer_helper |
693 | 738 | { |
694 | 739 |
@@ -720,8 +765,8 @@ | ||
720 | 765 | template<typename R, typename U>struct impl<R (U::*)() CV> : public true_type {}; \ |
721 | 766 | template<typename R, typename U>struct impl<R (U::*)(...) CV> : public true_type {} |
722 | 767 | |
723 | - template<typename R, typename U>struct impl<R (U::*)()> : public true_type {}; | |
724 | - template<typename R, typename U>struct impl<R (U::*)(...)> : public true_type {}; | |
768 | + template<typename R, typename U>struct impl<R(U::*)()> : public true_type {}; | |
769 | + template<typename R, typename U>struct impl<R(U::*)(...)> : public true_type {}; | |
725 | 770 | IIUT_DECL_IS_MEMBER_FUNCTION_PTR_VOID_CV_(const); |
726 | 771 | IIUT_DECL_IS_MEMBER_FUNCTION_PTR_VOID_CV_(volatile); |
727 | 772 | IIUT_DECL_IS_MEMBER_FUNCTION_PTR_VOID_CV_(const volatile); |
@@ -781,37 +826,10 @@ | ||
781 | 826 | { |
782 | 827 | }; |
783 | 828 | |
784 | -namespace is_member_pointer_helper | |
785 | -{ | |
829 | +#endif // #if defined(IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER) && IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER | |
786 | 830 | |
787 | -/** @private */ | |
788 | -template<typename T> | |
789 | -class is_member_pointer | |
790 | -{ | |
791 | - template<typename U> | |
792 | - struct impl : public false_type {}; | |
793 | - template<typename U, typename C> | |
794 | - struct impl<U C::*> : public true_type {}; | |
795 | - | |
796 | -public: | |
797 | - typedef bool_constant< impl< typename remove_cv<T>::type >::value | |
798 | - || is_member_function_pointer<T>::value > type; | |
799 | -}; | |
800 | - | |
801 | -} // end of namespace is_member_pointer_helper | |
802 | - | |
803 | -/** | |
804 | - * @brief is member pointer | |
805 | -*/ | |
806 | -template<typename T> | |
807 | -struct is_member_pointer | |
808 | - : public is_member_pointer_helper::is_member_pointer<T>::type | |
809 | -{ | |
810 | -}; | |
811 | - | |
812 | 831 | #endif // #if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) |
813 | 832 | |
814 | -#endif // #if IUTEST_HAS_HDR_TYPETRAITS | |
815 | 833 | |
816 | 834 | #if !defined(IUTEST_NO_ARGUMENT_DEPENDENT_LOOKUP) |
817 | 835 |
@@ -590,7 +590,13 @@ | ||
590 | 590 | # if (!defined(_MSC_VER) || _MSC_VER >= 1310) && (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x501) |
591 | 591 | # define IUTEST_HAS_SOCKET 1 |
592 | 592 | # endif |
593 | -# elif defined(IUTEST_OS_CYGWIN) || defined(IUTEST_OS_LINUX) | |
593 | +# elif defined(IUTEST_OS_CYGWIN) | |
594 | +# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) \ | |
595 | + || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE) \ | |
596 | + || (defined(_POSIX_SOURCE) && _POSIX_SOURCE) | |
597 | +# define IUTEST_HAS_SOCKET 1 | |
598 | +# endif | |
599 | +# elif defined(IUTEST_OS_LINUX) | |
594 | 600 | # define IUTEST_HAS_SOCKET 1 |
595 | 601 | # endif |
596 | 602 | #endif |
@@ -667,6 +673,11 @@ | ||
667 | 673 | #define IUTEST_USE_EXTERNAL_STD_TUPLE 0 |
668 | 674 | |
669 | 675 | /** |
676 | + * @brief std::is_member_function_pointer がコンパイルエラーになる場合に定義する | |
677 | +*/ | |
678 | +#define IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER 1 | |
679 | + | |
680 | +/** | |
670 | 681 | * @brief iutest で使用する乱数エンジンを指定します |
671 | 682 | * @details 未定義の場合は iutest が実装しているエンジンを使用します(XorShift 128) |
672 | 683 | */ |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2011-2017, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2011-2018, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -191,13 +191,13 @@ | ||
191 | 191 | |
192 | 192 | template<typename T> |
193 | 193 | inline void DefaultPtrPrintTo(T* ptr, iu_ostream* os |
194 | - , typename iutest_type_traits::enable_if_t< is_convertible<T*, const void*> >::type*& = iutest_type_traits::enabler::value) | |
194 | + , typename iutest_type_traits::enable_if_t< iutest_type_traits::is_convertible<T*, const void*> >::type*& = iutest_type_traits::enabler::value) | |
195 | 195 | { |
196 | 196 | *os << ptr; |
197 | 197 | } |
198 | 198 | template<typename T> |
199 | 199 | inline void DefaultPtrPrintTo(T* ptr, iu_ostream* os |
200 | - , typename iutest_type_traits::disable_if_t< is_convertible<T*, const void*> >::type*& = iutest_type_traits::enabler::value) | |
200 | + , typename iutest_type_traits::disable_if_t< iutest_type_traits::is_convertible<T*, const void*> >::type*& = iutest_type_traits::enabler::value) | |
201 | 201 | { |
202 | 202 | *os << reinterpret_cast<const void*>(reinterpret_cast<type_least_t<8>::UInt>(ptr)); |
203 | 203 | } |
@@ -17,11 +17,11 @@ | ||
17 | 17 | |
18 | 18 | //====================================================================== |
19 | 19 | // define |
20 | -#define IUTEST_VER 0x01160210u //!< iutest version 1.16.2.10 | |
20 | +#define IUTEST_VER 0x01160212u //!< iutest version 1.16.2.12 | |
21 | 21 | #define IUTEST_MAJORVER 0x01u //!< Major Version |
22 | 22 | #define IUTEST_MINORVER 0x16u //!< Minor Version |
23 | 23 | #define IUTEST_MICROVER 0x02u //!< Micro Version |
24 | -#define IUTEST_REVISION 0x10u //!< Revision | |
24 | +#define IUTEST_REVISION 0x12u //!< Revision | |
25 | 25 | |
26 | 26 | #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated |
27 | 27 |
@@ -11,6 +11,7 @@ | ||
11 | 11 | - gh-pages |
12 | 12 | |
13 | 13 | install: |
14 | + - pip install -i https://pypi.python.org/simple/ --upgrade pip | |
14 | 15 | - pip install requests |
15 | 16 | |
16 | 17 | before_script: |
@@ -89,6 +89,7 @@ | ||
89 | 89 | file_system_tests \ |
90 | 90 | filter_tests \ |
91 | 91 | flagfile_gtest_tests \ |
92 | + gtest_version_tests \ | |
92 | 93 | help_tests \ |
93 | 94 | inform_tests \ |
94 | 95 | internal_log_tests \ |
@@ -0,0 +1,84 @@ | ||
1 | +//====================================================================== | |
2 | +//----------------------------------------------------------------------- | |
3 | +/** | |
4 | + * @file gtest_version_tests.cpp | |
5 | + * @brief gtest version detect test | |
6 | + * | |
7 | + * @author t.shirayanagi | |
8 | + * @par copyright | |
9 | + * Copyright (C) 2018, Takazumi Shirayanagi\n | |
10 | + * This software is released under the new BSD License, | |
11 | + * see LICENSE | |
12 | +*/ | |
13 | +//----------------------------------------------------------------------- | |
14 | +//====================================================================== | |
15 | +//====================================================================== | |
16 | +// include | |
17 | +#include "iutest.hpp" | |
18 | + | |
19 | +#if defined(IUTEST_USE_GTEST) | |
20 | + | |
21 | +#if defined(GTEST_EXPECT_VER) | |
22 | + | |
23 | +IUTEST(GTest, Version) | |
24 | +{ | |
25 | + IUTEST_EXPECT_EQ(GTEST_EXPECT_VER, GTEST_VER); | |
26 | +} | |
27 | + | |
28 | +#endif | |
29 | + | |
30 | +#if defined(GTEST_EXPECT_LATEST) | |
31 | + | |
32 | +IUTEST(GTest, Latest) | |
33 | +{ | |
34 | + IUTEST_EXPECT_EQ(GTEST_EXPECT_LATEST, GTEST_LATEST); | |
35 | +} | |
36 | + | |
37 | +#endif | |
38 | + | |
39 | +#endif | |
40 | + | |
41 | +#if defined(IUTEST_USE_GMOCK) | |
42 | + | |
43 | +// 1.6 以降のみ対応している | |
44 | +#if GMOCK_VER >= 0x01060000 | |
45 | + | |
46 | +#if !defined(GMOCK_EXPECT_VER) && defined(GTEST_EXPECT_VER) | |
47 | +# define GMOCK_EXPECT_VER GTEST_EXPECT_VER | |
48 | +#endif | |
49 | + | |
50 | +#if defined(GMOCK_EXPECT_VER) | |
51 | + | |
52 | +IUTEST(GMock, Version) | |
53 | +{ | |
54 | + IUTEST_EXPECT_EQ(GMOCK_EXPECT_VER, GMOCK_VER); | |
55 | +} | |
56 | + | |
57 | +#endif | |
58 | + | |
59 | +#if !defined(GMOCK_EXPECT_LATEST) && defined(GTEST_EXPECT_LATEST) | |
60 | +# define GMOCK_EXPECT_LATEST GTEST_EXPECT_LATEST | |
61 | +#endif | |
62 | + | |
63 | +#if defined(GMOCK_EXPECT_LATEST) | |
64 | + | |
65 | +IUTEST(GMock, Latest) | |
66 | +{ | |
67 | + IUTEST_EXPECT_EQ(GMOCK_EXPECT_LATEST, GMOCK_LATEST); | |
68 | +} | |
69 | + | |
70 | +#endif | |
71 | + | |
72 | +#endif | |
73 | + | |
74 | +#endif | |
75 | + | |
76 | +#ifdef UNICODE | |
77 | +int wmain(int argc, wchar_t* argv[]) | |
78 | +#else | |
79 | +int main(int argc, char* argv[]) | |
80 | +#endif | |
81 | +{ | |
82 | + IUTEST_INIT(&argc, argv); | |
83 | + return IUTEST_RUN_ALL_TESTS(); | |
84 | +} |
@@ -607,6 +607,9 @@ | ||
607 | 607 | |
608 | 608 | # show result |
609 | 609 | def show_result(r, options): |
610 | + if r is None: | |
611 | + print('failed: timeout...') | |
612 | + sys.exit(1) | |
610 | 613 | if 'error' in r: |
611 | 614 | print(r['error']) |
612 | 615 | sys.exit(1) |