• R/O
  • SSH
  • HTTPS

iutest: Commit


Commit MetaInfo

Revision1312 (tree)
Time2018-04-02 23:03:19
Authorsrz_zumix

Log Message

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

Change Summary

Incremental Difference

--- trunk/README.md (revision 1311)
+++ trunk/README.md (revision 1312)
@@ -9,7 +9,7 @@
99 [![Bitrise Build Status](https://www.bitrise.io/app/a1525fe176d85f53/status.svg?token=C67enKOhen9rjw_Cl37ihA&branch=master)](https://www.bitrise.io/app/a1525fe176d85f53)
1010 [![CircleCI](https://circleci.com/gh/srz-zumix/iutest/tree/master.svg?style=svg)](https://circleci.com/gh/srz-zumix/iutest/tree/master)
1111 [![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)
1313 [![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)
1414 [![Coverage Status](https://coveralls.io/repos/github/srz-zumix/iutest/badge.svg?branch=master)](https://coveralls.io/github/srz-zumix/iutest?branch=master)
1515 [![codecov](https://codecov.io/gh/srz-zumix/iutest/branch/master/graph/badge.svg)](https://codecov.io/gh/srz-zumix/iutest)
--- trunk/tools/wandbox/iuwandbox.py (revision 1311)
+++ trunk/tools/wandbox/iuwandbox.py (revision 1312)
@@ -607,6 +607,9 @@
607607
608608 # show result
609609 def show_result(r, options):
610+ if r is None:
611+ print('failed: timeout...')
612+ sys.exit(1)
610613 if 'error' in r:
611614 print(r['error'])
612615 sys.exit(1)
--- trunk/shippable.yml (revision 1311)
+++ trunk/shippable.yml (revision 1312)
@@ -11,6 +11,7 @@
1111 - gh-pages
1212
1313 install:
14+ - pip install -i https://pypi.python.org/simple/ --upgrade pip
1415 - pip install requests
1516
1617 before_script:
--- trunk/test/gtest_version_tests.cpp (revision 0)
+++ trunk/test/gtest_version_tests.cpp (revision 1312)
@@ -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+}
--- trunk/test/CommonMakefile.in (revision 1311)
+++ trunk/test/CommonMakefile.in (revision 1312)
@@ -89,6 +89,7 @@
8989 file_system_tests \
9090 filter_tests \
9191 flagfile_gtest_tests \
92+ gtest_version_tests \
9293 help_tests \
9394 inform_tests \
9495 internal_log_tests \
--- trunk/include/iutest_ver.hpp (revision 1311)
+++ trunk/include/iutest_ver.hpp (revision 1312)
@@ -17,11 +17,11 @@
1717
1818 //======================================================================
1919 // define
20-#define IUTEST_VER 0x01160210u //!< iutest version 1.16.2.10
20+#define IUTEST_VER 0x01160212u //!< iutest version 1.16.2.12
2121 #define IUTEST_MAJORVER 0x01u //!< Major Version
2222 #define IUTEST_MINORVER 0x16u //!< Minor Version
2323 #define IUTEST_MICROVER 0x02u //!< Micro Version
24-#define IUTEST_REVISION 0x10u //!< Revision
24+#define IUTEST_REVISION 0x12u //!< Revision
2525
2626 #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated
2727
--- trunk/include/gtest/iutest_gmock_ver.hpp (revision 1311)
+++ trunk/include/gtest/iutest_gmock_ver.hpp (revision 1312)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2014-2016, Takazumi Shirayanagi\n
9+ * Copyright (C) 2014-2018, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -32,7 +32,9 @@
3232
3333 //!< Minor Version
3434 #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_)
3638 # define GMOCK_MINORVER 0x07
3739 # else
3840 // v1.6.0 以前は未対応
@@ -56,6 +58,10 @@
5658 ) //!< google test version
5759 #endif
5860
61+#if !defined(GMOCK_LATEST)
62+# define GMOCK_LATEST 0 //!< google test development latest version
5963 #endif
6064
65+#endif
66+
6167 #endif // INCG_IRIS_IUTEST_GMOCK_VER_HPP_CBBF82C8_EB6F_4398_BAA6_5B485AC52D36_
--- trunk/include/gtest/iutest_gtest_ver.hpp (revision 1311)
+++ trunk/include/gtest/iutest_gtest_ver.hpp (revision 1312)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2012-2017, Takazumi Shirayanagi\n
9+ * Copyright (C) 2012-2018, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -81,6 +81,10 @@
8181 ) //!< google test version
8282 #endif
8383
84+#if !defined(GTEST_LATEST)
85+# define GTEST_LATEST 0 //!< google test development latest version
8486 #endif
8587
88+#endif
89+
8690 #endif // INCG_IRIS_IUTEST_GTEST_VER_HPP_7396AEF4_D1AB_44B5_9FE3_23CEC1240158_
--- trunk/include/iutest_config.hpp (revision 1311)
+++ trunk/include/iutest_config.hpp (revision 1312)
@@ -590,7 +590,13 @@
590590 # if (!defined(_MSC_VER) || _MSC_VER >= 1310) && (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x501)
591591 # define IUTEST_HAS_SOCKET 1
592592 # 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)
594600 # define IUTEST_HAS_SOCKET 1
595601 # endif
596602 #endif
@@ -667,6 +673,11 @@
667673 #define IUTEST_USE_EXTERNAL_STD_TUPLE 0
668674
669675 /**
676+ * @brief std::is_member_function_pointer がコンパイルエラーになる場合に定義する
677+*/
678+#define IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER 1
679+
680+/**
670681 * @brief iutest で使用する乱数エンジンを指定します
671682 * @details 未定義の場合は iutest が実装しているエンジンを使用します(XorShift 128)
672683 */
--- trunk/include/iutest_printers.hpp (revision 1311)
+++ trunk/include/iutest_printers.hpp (revision 1312)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2011-2017, Takazumi Shirayanagi\n
9+ * Copyright (C) 2011-2018, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -191,13 +191,13 @@
191191
192192 template<typename T>
193193 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)
195195 {
196196 *os << ptr;
197197 }
198198 template<typename T>
199199 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)
201201 {
202202 *os << reinterpret_cast<const void*>(reinterpret_cast<type_least_t<8>::UInt>(ptr));
203203 }
--- trunk/include/internal/iutest_type_traits.hpp (revision 1311)
+++ trunk/include/internal/iutest_type_traits.hpp (revision 1312)
@@ -53,6 +53,10 @@
5353
5454 #if IUTEST_HAS_HDR_TYPETARITS
5555 # 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
5660 #endif
5761
5862 /** iutest type traits */
@@ -142,8 +146,11 @@
142146 typedef typename impl<T, void>::type type;
143147 };
144148
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;
145151 #endif
146152
153+#endif
147154
148155 #if IUTEST_HAS_HDR_TYPETARITS
149156
@@ -169,7 +176,9 @@
169176 struct add_rvalue_reference { typedef T type; };
170177 #endif
171178 using ::std::is_function;
179+#if !defined(IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER) || !IUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER
172180 using ::std::is_member_function_pointer;
181+#endif
173182 using ::std::is_member_pointer;
174183
175184 template<typename F>
@@ -689,6 +698,42 @@
689698 {
690699 };
691700
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+
692737 namespace is_member_function_pointer_helper
693738 {
694739
@@ -720,8 +765,8 @@
720765 template<typename R, typename U>struct impl<R (U::*)() CV> : public true_type {}; \
721766 template<typename R, typename U>struct impl<R (U::*)(...) CV> : public true_type {}
722767
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 {};
725770 IIUT_DECL_IS_MEMBER_FUNCTION_PTR_VOID_CV_(const);
726771 IIUT_DECL_IS_MEMBER_FUNCTION_PTR_VOID_CV_(volatile);
727772 IIUT_DECL_IS_MEMBER_FUNCTION_PTR_VOID_CV_(const volatile);
@@ -781,37 +826,10 @@
781826 {
782827 };
783828
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
786830
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-
812831 #endif // #if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
813832
814-#endif // #if IUTEST_HAS_HDR_TYPETRAITS
815833
816834 #if !defined(IUTEST_NO_ARGUMENT_DEPENDENT_LOOKUP)
817835
--- trunk/.travis.yml (revision 1311)
+++ trunk/.travis.yml (revision 1312)
@@ -11,10 +11,11 @@
1111 apt: &apt-global
1212 sources: &apt-common-sources
1313 - ubuntu-toolchain-r-test
14- - llvm-toolchain-trusty-5.0
14+ - llvm-toolchain-trusty-6.0
1515 - llvm-toolchain-trusty
1616 packages: &apt-common-packages
17- - clang-5.0
17+ - clang-6.0
18+ - libc++-dev
1819 - g++-7
1920 - gcc-7
2021 #- cppcheck
@@ -81,7 +82,7 @@
8182 # clang
8283 - |
8384 if [ "${CXX}" = 'clang++' ]; then
84- export CXX=clang++-5.0;
85+ export CXX=clang++-6.0;
8586 fi
8687 # mingw
8788 - if [ "${MINGW}" = '1' ]; then export CXX=i686-w64-mingw32-g++; fi
@@ -126,6 +127,11 @@
126127
127128 matrix:
128129 include:
130+ # libc++
131+ - compiler: clang
132+ env:
133+ - STDFLAG=-stdlib=libc++
134+ - DEFS="-DIUTEST_USE_OWN_IS_MEMBER_FUNCTION_POINTER=1"
129135 # coverage
130136 - compiler: clang
131137 env: USE_COVERAGE=gcov USE_CODECOV=1 USE_GNU_EXTENSION=1
Show on old repository browser