diff --git a/CHANGES.md b/CHANGES.md index e22273f556..267d78297e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,9 @@ * Improved +* Changes + * deprecated: IUTEST_USE_OWN_LIST + * Bug fixes -------------------------------------------------- diff --git a/README.md b/README.md index ee49623707..9cc49c1197 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Travis-CI Build Status](https://travis-ci.org/srz-zumix/iutest.svg?branch=master)](https://travis-ci.org/srz-zumix/iutest) +[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=master)](https://travis-ci.com/srz-zumix/iutest) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/2gdmgo8ce8m0iy0e/branch/master?svg=true)](https://ci.appveyor.com/project/srz-zumix/iutest/branch/master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/1316/badge.svg)](https://scan.coverity.com/projects/srz-zumix-iutest) [![Codeship Status for srz-zumix/iutest](https://codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://codeship.com/projects/110695) @@ -103,7 +103,7 @@ Tests |CI|master|develop|Tests| |:--|:--|:--|:--| -|Travis CI |[![Travis-CI Build Status](https://travis-ci.org/srz-zumix/iutest.svg?branch=master)](https://travis-ci.org/srz-zumix/iutest)|[![Travis-CI Build Status](https://travis-ci.org/srz-zumix/iutest.svg?branch=develop)](https://travis-ci.org/srz-zumix/iutest)|Basic tests, Google Test compatibility, Coverage, Coverity-scan| +|Travis CI |[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=master)](https://travis-ci.com/srz-zumix/iutest)|[![Travis-CI Build Status](https://travis-ci.com/srz-zumix/iutest.svg?branch=develop)](https://travis-ci.com/srz-zumix/iutest)|Basic tests, Google Test compatibility, Coverage, Coverity-scan| |AppVeyor |[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/2gdmgo8ce8m0iy0e/branch/master?svg=true)](https://ci.appveyor.com/project/srz-zumix/iutest/branch/master)|[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/2gdmgo8ce8m0iy0e/branch/develop?svg=true)](https://ci.appveyor.com/project/srz-zumix/iutest/branch/develop)|Windows, Visual Studio, Cygwin, MINGW, NuGet| | |[![AppVeyor Build PREFAST status](https://ci.appveyor.com/api/projects/status/0w0wuhc58kre178q/branch/master?svg=true)](https://ci.appveyor.com/project/srz-zumix/iutest-xsqun/branch/master)|[![AppVeyor Build PREFAST status](https://ci.appveyor.com/api/projects/status/0w0wuhc58kre178q/branch/develop?svg=true)](https://ci.appveyor.com/project/srz-zumix/iutest-xsqun/branch/develop)|Visual Studio PREFAST (Code Analysis)| |Wercker |[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/master "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|[![wercker status](https://app.wercker.com/status/d385156052aa4118a7f24affe4a8f851/s/develop "wercker status")](https://app.wercker.com/project/byKey/d385156052aa4118a7f24affe4a8f851)|Syntax tests for compiler each version| diff --git a/buddy.yml b/buddy.yml index 7eb86c2623..8fb7f57703 100644 --- a/buddy.yml +++ b/buddy.yml @@ -42,8 +42,20 @@ docker_image_tag: "latest" execute_commands: - "cd test" - - "make USE_GTEST=1 GTEST_EXPECT_VER=0x01080000 GTEST_EXPECT_LATEST=1 gtest-version" - - "make USE_GTEST=1 USE_GMOCK=1 GTEST_EXPECT_VER=0x01080000 GTEST_EXPECT_LATEST=1 gtest-version" + - "make USE_GTEST=1 GTEST_EXPECT_VER=0x01080100 GTEST_EXPECT_LATEST=1 gtest-version" + - "make USE_GTEST=1 USE_GMOCK=1 GTEST_EXPECT_VER=0x01080100 GTEST_EXPECT_LATEST=1 gtest-version" + mount_filesystem_path: "/buddy/iutest" + shell: "SH" + trigger_condition: "ALWAYS" + - action: "release-1.8.1" + type: "BUILD" + working_directory: "/buddy/iutest" + docker_image_name: "srzzumix/googletest" + docker_image_tag: "release-1.8.1" + execute_commands: + - "cd test" + - "make USE_GTEST=1 GTEST_EXPECT_VER=0x01080100 gtest-version" + - "make USE_GTEST=1 USE_GMOCK=1 GTEST_EXPECT_VER=0x01080100 gtest-version" mount_filesystem_path: "/buddy/iutest" shell: "SH" trigger_condition: "ALWAYS" diff --git a/docs/Doxyfile b/docs/Doxyfile index d77dfa45f0..02029e6d38 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = iutest # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.16.99.3 +PROJECT_NUMBER = 1.16.99.5 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/include/gtest/iutest_gmock_ver.hpp b/include/gtest/iutest_gmock_ver.hpp index cfb634d4a7..4e7f8aa769 100644 --- a/include/gtest/iutest_gmock_ver.hpp +++ b/include/gtest/iutest_gmock_ver.hpp @@ -32,7 +32,7 @@ //!< Minor Version #ifndef GMOCK_MINORVER -# if defined(GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_) +# if !defined(GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_) # define GMOCK_MINORVER 0x08 # define GMOCK_LATEST 1 # elif defined(GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_) @@ -50,8 +50,19 @@ # endif #endif +//!< Micro Version +#ifndef GMOCK_MICROVER +# if GMOCK_MICROVER == 0x08 && defined(GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_) +# define GMOCK_MICROVER 0x01 +# endif +#endif + +#ifndef GMOCK_MICROVER +# define GMOCK_MICROVER 0x00 +#endif + #ifndef GMOCK_BUILD -# define GMOCK_BUILD 0x00 //!< Build +# define GMOCK_BUILD GMOCK_MICROVER //!< @deprecated #endif #ifndef GMOCK_REVISION @@ -61,13 +72,13 @@ #ifndef GMOCK_VER # define GMOCK_VER ((GMOCK_MAJORVER<<24) \ |(GMOCK_MINORVER<<16) \ - |(GMOCK_BUILD<<8) \ + |(GMOCK_MICROVER<<8) \ |(GMOCK_REVISION<<0) \ - ) //!< google test version + ) //!< google mock version #endif #if !defined(GMOCK_LATEST) -# define GMOCK_LATEST 0 //!< google test development latest version +# define GMOCK_LATEST 0 //!< google mock development latest version #endif #endif diff --git a/include/gtest/iutest_gtest_ver.hpp b/include/gtest/iutest_gtest_ver.hpp index a2523b51cc..c958341b85 100644 --- a/include/gtest/iutest_gtest_ver.hpp +++ b/include/gtest/iutest_gtest_ver.hpp @@ -32,7 +32,7 @@ //!< Minor Version #ifndef GTEST_MINORVER -# if defined(GTEST_STRINGIFY_) +# if !defined(GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_) # define GTEST_MINORVER 0x08 # define GTEST_LATEST 1 # elif defined(GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_) @@ -58,16 +58,20 @@ //!< Micro Version #ifndef GTEST_MICROVER -# if GTEST_MINORVER == 0x02 && defined(GTEST_HAS_CLONE) +# if GTEST_MINORVER == 0x08 && defined(GTEST_STRINGIFY_) +# define GTEST_MICROVER 0x01 +# elif GTEST_MINORVER == 0x02 && defined(GTEST_HAS_CLONE) # define GTEST_MICROVER 0x01 # elif GTEST_MINORVER == 0x00 // 判断難しい # define GTEST_MICROVER 0x01 -# else -# define GTEST_MICROVER 0x00 # endif #endif +#ifndef GTEST_MICROVER +# define GTEST_MICROVER 0x00 +#endif + #ifndef GTEST_BUILD # define GTEST_BUILD GTEST_MICROVER //!< @deprecated #endif diff --git a/include/gtest/iutest_switch_for_gtest.hpp b/include/gtest/iutest_switch_for_gtest.hpp index cdc27105f7..97e5fb9b57 100644 --- a/include/gtest/iutest_switch_for_gtest.hpp +++ b/include/gtest/iutest_switch_for_gtest.hpp @@ -276,7 +276,7 @@ inline void IUTEST_ATTRIBUTE_UNUSED_ InitIrisUnitTest(int* pargc, const wchar_t* // tuple namespace tuples { -#if GTEST_HAS_STD_TUPLE_ +#if GTEST_VER >= 0x01090000 || GTEST_LATEST || (defined(GTEST_HAS_STD_TUPLE_) && GTEST_HAS_STD_TUPLE_) using ::std::tuple; using ::std::tuple_size; using ::std::tuple_element; diff --git a/include/impl/iutest_case.ipp b/include/impl/iutest_case.ipp index 3ed6fb1957..4e800f68ac 100644 --- a/include/impl/iutest_case.ipp +++ b/include/impl/iutest_case.ipp @@ -94,7 +94,7 @@ IUTEST_IPP_INLINE bool TestCase::RunImpl() for( iuTestInfos::iterator it = m_testinfos.begin(), end=m_testinfos.end(); it != end; ++it ) { // 実行 - if( !(it)->Run() ) + if( !(*it)->Run() ) { result = false; } @@ -116,7 +116,7 @@ IUTEST_IPP_INLINE bool TestCase::CheckSetUpSkipped() { for(iuTestInfos::iterator it = m_testinfos.begin(), end = m_testinfos.end(); it != end; ++it) { - (it)->skip(); + (*it)->skip(); } return true; } @@ -128,7 +128,7 @@ IUTEST_IPP_INLINE void TestCase::clear() m_ad_hoc_testresult.Clear(); for( iuTestInfos::iterator it = m_testinfos.begin(), end=m_testinfos.end(); it != end; ++it ) { - (it)->clear(); + (*it)->clear(); } } @@ -141,13 +141,13 @@ IUTEST_IPP_INLINE bool TestCase::filter() if( m_disable ) { // DISABLE の伝搬 - (it)->m_disable = true; + (*it)->m_disable = true; } - if( (it)->is_disabled_test() ) + if( (*it)->is_disabled_test() ) { ++m_disable_num; } - if( (it)->filter() ) + if( (*it)->filter() ) { ++m_should_run_num; } diff --git a/include/impl/iutest_core.ipp b/include/impl/iutest_core.ipp index f20f7adad2..ebd0b5baea 100644 --- a/include/impl/iutest_core.ipp +++ b/include/impl/iutest_core.ipp @@ -85,7 +85,7 @@ IUTEST_IPP_INLINE bool UnitTest::Passed() const } for( iuTestCases::const_iterator it=m_testcases.begin(), end=m_testcases.end(); it != end; ++it ) { - if( (it)->Failed() ) + if( (*it)->Failed() ) { return false; } @@ -239,8 +239,8 @@ IUTEST_IPP_INLINE bool UnitTest::RunOnce() sw.start(); for( iuTestCases::iterator it=m_testcases.begin(), end=m_testcases.end(); it != end; ++it ) { - m_current_testcase = it; - (it)->Run(); + m_current_testcase = *it; + m_current_testcase->Run(); m_current_testcase = NULL; } m_elapsedmsec = sw.stop(); @@ -268,9 +268,10 @@ IUTEST_IPP_INLINE void UnitTest::TestProgramStart() m_disable_num = 0; for( iuTestCases::iterator it = m_testcases.begin(), end=m_testcases.end(); it != end; ++it ) { - (it)->filter(); - m_should_run_num += (it)->test_to_run_count(); - m_disable_num += (it)->disabled_test_count(); + TestCase* testcase = *it; + testcase->filter(); + m_should_run_num += testcase->test_to_run_count(); + m_disable_num += testcase->disabled_test_count(); } atexit(OnExit); diff --git a/include/impl/iutest_core_impl.ipp b/include/impl/iutest_core_impl.ipp index b43fe4b736..1231badafe 100644 --- a/include/impl/iutest_core_impl.ipp +++ b/include/impl/iutest_core_impl.ipp @@ -60,13 +60,13 @@ IUTEST_IPP_INLINE int UnitTestImpl::Listup() const detail::iuConsole::output("%d tests from %d testcase\n", m_total_test_num, m_testcases.size() ); for( iuTestCases::const_iterator it = m_testcases.begin(), end=m_testcases.end(); it != end; ++it ) { - detail::iuConsole::output((it)->name()); + detail::iuConsole::output((*it)->name()); detail::iuConsole::output("\n"); - for( TestCase::iuTestInfos::const_iterator it2 = (it)->begin(), end2=(it)->end(); it2 != end2; ++it2 ) + for( TestCase::iuTestInfos::const_iterator it2 = (*it)->begin(), end2=(*it)->end(); it2 != end2; ++it2 ) { detail::iuConsole::output(" "); - detail::iuConsole::output((it2)->name()); + detail::iuConsole::output((*it2)->name()); detail::iuConsole::output("\n"); } } @@ -78,13 +78,13 @@ IUTEST_IPP_INLINE int UnitTestImpl::ListupWithWhere() const detail::iuConsole::output("%d tests from %d testcase\n", m_total_test_num, m_testcases.size() ); for( iuTestCases::const_iterator it = m_testcases.begin(), end=m_testcases.end(); it != end; ++it ) { - detail::iuConsole::output((it)->testcase_name_with_where().c_str()); + detail::iuConsole::output((*it)->testcase_name_with_where().c_str()); detail::iuConsole::output("\n"); - for( TestCase::iuTestInfos::const_iterator it2 = (it)->begin(), end2=(it)->end(); it2 != end2; ++it2 ) + for( TestCase::iuTestInfos::const_iterator it2 = (*it)->begin(), end2=(*it)->end(); it2 != end2; ++it2 ) { detail::iuConsole::output(" "); - detail::iuConsole::output((it2)->test_name_with_where().c_str()); + detail::iuConsole::output((*it2)->test_name_with_where().c_str()); detail::iuConsole::output("\n"); } } @@ -107,7 +107,7 @@ IUTEST_IPP_INLINE void UnitTestImpl::ClearNonAdHocTestResult() { for( iuTestCases::iterator it=m_testcases.begin(), end=m_testcases.end(); it != end; ++it ) { - (it)->clear(); + (*it)->clear(); } } @@ -220,7 +220,7 @@ IUTEST_IPP_INLINE void UnitTestImpl::TerminateImpl() { for( iuTestCases::iterator it = m_testcases.begin(); it != m_testcases.end(); it = m_testcases.begin()) { - TestCase* p = (it); + TestCase* p = (*it); m_testcases.erase(it); delete p; } diff --git a/include/internal/iutest_core_impl.hpp b/include/internal/iutest_core_impl.hpp index 78368a8278..847b97ca3a 100644 --- a/include/internal/iutest_core_impl.hpp +++ b/include/internal/iutest_core_impl.hpp @@ -30,8 +30,11 @@ namespace iutest class UnitTestImpl { protected: +#if IUTEST_USE_OWN_LIST typedef detail::iu_list iuTestCases; - //typedef ::std::vector iuTestCases; +#else + typedef ::std::vector iuTestCases; +#endif typedef ::std::vector iuEnvironmentList; protected: UnitTestImpl() : m_total_test_num(0), m_disable_num(0), m_should_run_num(0) diff --git a/include/internal/iutest_list.hpp b/include/internal/iutest_list.hpp index b2e71d948b..d8cf652afb 100644 --- a/include/internal/iutest_list.hpp +++ b/include/internal/iutest_list.hpp @@ -17,14 +17,20 @@ //====================================================================== // include -#ifdef _IUTEST_DEBUG -#include +#if IUTEST_USE_OWN_LIST +# ifdef _IUTEST_DEBUG +# include +# endif +#else +# include #endif namespace iutest { namespace detail { +#if IUTEST_USE_OWN_LIST + //====================================================================== // class /** @@ -80,7 +86,7 @@ class iu_list_iterator _Myt& operator ++ () { m_node = m_node->next; return *this; } _Myt& operator -- () { m_node = m_node->prev; return *this; } value_ptr operator -> () IUTEST_CXX_NOEXCEPT_SPEC { return ptr(); } - value_ref operator * () IUTEST_CXX_NOEXCEPT_SPEC { return *m_node; } + value_ptr operator * () IUTEST_CXX_NOEXCEPT_SPEC { return m_node; } value_ptr ptr() const IUTEST_CXX_NOEXCEPT_SPEC { return m_node; } operator value_ptr () { return ptr(); } @@ -225,7 +231,7 @@ class iu_list p->prev = prev; } // 削除 - void erase(node_ptr p) + void remove(node_ptr p) { if( p == NULL ) { @@ -255,7 +261,7 @@ class iu_list } void erase(iterator it) { - erase(it.ptr()); + remove(it.ptr()); } public: /** @@ -444,6 +450,9 @@ class iu_list #endif }; +#endif + + IUTEST_PRAGMA_WARN_PUSH() IUTEST_PRAGMA_WARN_DISABLE_NOEXCEPT_TPYE() @@ -455,46 +464,69 @@ void RandomShuffle(It begin, It last, iuRandom& r) { r.shuffle(begin, last); } - +#if IUTEST_USE_OWN_LIST template void RandomShuffle(iu_list& list, Fn& r) { list.shuffle(r); } -template -void RandomShuffle(::std::vector& list, Fn& r) +#endif +template +void RandomShuffle(::std::vector& list, Fn& r) { RandomShuffle(list.begin(), list.end(), r); } +#if IUTEST_USE_OWN_LIST template Node* FindList(const iu_list& list, Fn& f) { return list.find(f); } -template -Node FindList(const ::std::vector& list, Fn& f) +#else +template +T FindList(const ::std::vector& list, Fn& f) { - for( typename ::std::vector::const_iterator it=list.begin(), end=list.end(); it != end; ++it ) + for(typename ::std::vector::const_iterator it = list.begin(), end = list.end(); it != end; ++it) { - if( f(*it) ) + if(f(*it)) { return *it; } } return NULL; } +#endif + /** * @brief 条件に合う要素数をカウント */ +#if IUTEST_USE_OWN_LIST + template int CountIf(const iu_list& list, Fn f) { int count = 0; for( typename iu_list::const_iterator it = list.begin(), end=list.end(); it != end; ++it ) { - if( f(it) ) + if( f(*it) ) + { + ++count; + } + } + return count; +} + +#else + +template +int CountIf(const ::std::vector& list, Fn f) +{ + int count = 0; + for(typename ::std::vector::const_iterator it = list.begin(), end = list.end(); it != end; ++it) + { + if(f(*it)) { ++count; } @@ -502,30 +534,53 @@ int CountIf(const iu_list& list, Fn f) return count; } +#endif + + /** * @brief リストの示す値の総和 */ +#if IUTEST_USE_OWN_LIST + template int SumOverList(const iu_list& list, Fn f) { int count = 0; for( typename iu_list::const_iterator it = list.begin(), end=list.end(); it != end; ++it ) { - count += ((*it).*f)(); + count += ((*it)->*f)(); } return count; } +#else + +template +int SumOverList(const ::std::vector& list, Fn f) +{ + int count = 0; + for(typename ::std::vector::const_iterator it = list.begin(), end = list.end(); it != end; ++it) + { + count += ((*it)->*f)(); + } + return count; +} + +#endif + + /** * @brief リストの示す真の総和 */ +#if IUTEST_USE_OWN_LIST + template int CountIfOverList(const iu_list& list, Fn f) { int count = 0; for( typename iu_list::const_iterator it = list.begin(), end=list.end(); it != end; ++it ) { - if( ((*it).*f)() ) + if( ((*it)->*f)() ) { ++count; } @@ -533,15 +588,50 @@ int CountIfOverList(const iu_list& list, Fn f) return count; } +#else + +template +int CountIfOverList(const ::std::vector& list, Fn f) +{ + int count = 0; + for(typename ::std::vector::const_iterator it = list.begin(), end = list.end(); it != end; ++it) + { + if(((*it)->*f)()) + { + ++count; + } + } + return count; +} + +#endif + /** * @brief 条件に合う要素があるかどうか */ +#if IUTEST_USE_OWN_LIST + template bool AnyOverList(const iu_list& list, Fn f) { for( typename iu_list::const_iterator it = list.begin(), end=list.end(); it != end; ++it ) { - if( ((*it).*f)() ) + if( ((*it)->*f)() ) + { + return true; + } + } + return false; +} + +#else + +template +bool AnyOverList(const ::std::vector& list, Fn f) +{ + for(typename ::std::vector::const_iterator it = list.begin(), end = list.end(); it != end; ++it) + { + if(((*it)->*f)()) { return true; } @@ -549,6 +639,8 @@ bool AnyOverList(const iu_list& list, Fn f) return false; } +#endif + IUTEST_PRAGMA_WARN_POP() } // end of namespace detail diff --git a/include/iutest_assertion.hpp b/include/iutest_assertion.hpp index 0bf0b646bf..3c9c32e4d4 100644 --- a/include/iutest_assertion.hpp +++ b/include/iutest_assertion.hpp @@ -202,8 +202,11 @@ class AssertionHelper public: /** @private */ - class ScopedMessage : public detail::iu_list_node - , public detail::iuCodeMessage + class ScopedMessage + : public detail::iuCodeMessage +#if IUTEST_USE_OWN_LIST + , public detail::iu_list_node +#endif { public: ScopedMessage(const detail::iuCodeMessage& msg) // NOLINT @@ -213,20 +216,24 @@ class AssertionHelper } ~ScopedMessage() { - ScopedTrace::GetInstance().list.erase(this); + ScopedTrace::GetInstance().list.remove(this); } }; private: class ScopedTrace { public: +#if IUTEST_USE_OWN_LIST typedef detail::iu_list msg_list; +#else + typedef ::std::list msg_list; +#endif msg_list list; static ScopedTrace& GetInstance() { static ScopedTrace inst; return inst; } public: void append_message(TestPartResult& part_result) { - if( list.count() ) + if( list.size() ) { part_result.add_message("\niutest trace:"); for( msg_list::iterator it = list.begin(), end=list.end(); it != end; ++it ) @@ -234,7 +241,7 @@ class AssertionHelper // TODO : 追加メッセージとして保存するべき // 現状はテスト結果のメッセージに追加している。 part_result.add_message("\n"); - part_result.add_message(it->make_message().c_str()); + part_result.add_message((*it)->make_message().c_str()); } } } diff --git a/include/iutest_case.hpp b/include/iutest_case.hpp index 1916eb693f..5d2543a215 100644 --- a/include/iutest_case.hpp +++ b/include/iutest_case.hpp @@ -28,11 +28,18 @@ namespace iutest * @brief テストケース */ class TestCase +#if IUTEST_USE_OWN_LIST : public detail::iu_list_node +#endif { protected: - typedef detail::iu_list iuTestInfos; //!< TestInfo リスト - //typedef ::std::vector iuTestInfos; //!< TestInfo リスト + //! TestInfo リスト +#if IUTEST_USE_OWN_LIST + typedef detail::iu_list iuTestInfos; +#else + typedef ::std::vector iuTestInfos; +#endif + protected: /** * @brief コンストラクタ diff --git a/include/iutest_config.hpp b/include/iutest_config.hpp index d36e582c15..079193e7f2 100644 --- a/include/iutest_config.hpp +++ b/include/iutest_config.hpp @@ -639,6 +639,20 @@ #endif +/** + * @brief テストの所持を独自リストクラスで行う + * @deprecated +*/ +#if !defined(IUTEST_USE_OWN_LIST) +# if defined(IUTEST_NO_TEMPLATE_TEMPLATES) +# define IUTEST_USE_OWN_LIST 1 +# endif +#endif + +#if !defined(IUTEST_USE_OWN_LIST) +# define IUTEST_USE_OWN_LIST 0 +#endif + /** * @} */ diff --git a/include/iutest_info.hpp b/include/iutest_info.hpp index 8d3c93438c..fcc53de66e 100644 --- a/include/iutest_info.hpp +++ b/include/iutest_info.hpp @@ -29,7 +29,9 @@ namespace iutest * @brief テスト情報クラス */ class TestInfo +#if IUTEST_USE_OWN_LIST : public detail::iu_list_node +#endif { public: /** diff --git a/include/iutest_ver.hpp b/include/iutest_ver.hpp index 19f5b6b6f0..8b6ce0425b 100644 --- a/include/iutest_ver.hpp +++ b/include/iutest_ver.hpp @@ -17,11 +17,11 @@ //====================================================================== // define -#define IUTEST_VER 0x01169903u //!< iutest version 1.16.99.3 +#define IUTEST_VER 0x01169905u //!< iutest version 1.16.99.5 #define IUTEST_MAJORVER 0x01u //!< Major Version #define IUTEST_MINORVER 0x16u //!< Minor Version #define IUTEST_MICROVER 0x99u //!< Micro Version -#define IUTEST_REVISION 0x03u //!< Revision +#define IUTEST_REVISION 0x05u //!< Revision #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated @@ -120,6 +120,11 @@ * @page CHANGELOG 変更履歴 * @par Changes
    +
  • v1.17.0.0 +
      +
    • +
    +
  • v1.16.7.0
    • 古い google mock の互換性エラー修正
    • diff --git a/projects/cmake/.gitignore b/projects/cmake/.gitignore new file mode 100644 index 0000000000..355164c126 --- /dev/null +++ b/projects/cmake/.gitignore @@ -0,0 +1 @@ +*/ diff --git a/test/cxx_feature_tests.cpp b/test/cxx_feature_tests.cpp index 441cf8d328..2789eb62ec 100644 --- a/test/cxx_feature_tests.cpp +++ b/test/cxx_feature_tests.cpp @@ -89,6 +89,10 @@ IUTEST(Optional, Compare) IUTEST_EXPECT_TRUE(opt); IUTEST_EXPECT_EQ(0, opt); } + { + ::std::optional opt = ::std::nullopt; + IUTEST_EXPECT_EQ(::std::nullopt, opt); + } { ::std::optional opt = ::std::nullopt; IUTEST_EXPECT_FALSE(opt);