Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Nov 1, 2018
2 parents 5b609d6 + b10d701 commit 6d0e3f3
Show file tree
Hide file tree
Showing 19 changed files with 227 additions and 61 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Expand Up @@ -6,6 +6,9 @@

* Improved

* Changes
* deprecated: IUTEST_USE_OWN_LIST

* Bug fixes

--------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions 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)
Expand Down Expand Up @@ -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|
Expand Down
16 changes: 14 additions & 2 deletions buddy.yml
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Expand Up @@ -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
Expand Down
21 changes: 16 additions & 5 deletions include/gtest/iutest_gmock_ver.hpp
Expand Up @@ -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_)
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions include/gtest/iutest_gtest_ver.hpp
Expand Up @@ -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_)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/gtest/iutest_switch_for_gtest.hpp
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions include/impl/iutest_case.ipp
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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();
}
}

Expand All @@ -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;
}
Expand Down
13 changes: 7 additions & 6 deletions include/impl/iutest_core.ipp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions include/impl/iutest_core_impl.ipp
Expand Up @@ -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");
}
}
Expand All @@ -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");
}
}
Expand All @@ -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();
}
}

Expand Down Expand Up @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion include/internal/iutest_core_impl.hpp
Expand Up @@ -30,8 +30,11 @@ namespace iutest
class UnitTestImpl
{
protected:
#if IUTEST_USE_OWN_LIST
typedef detail::iu_list<TestCase> iuTestCases;
//typedef ::std::vector<TestCase*> iuTestCases;
#else
typedef ::std::vector<TestCase*> iuTestCases;
#endif
typedef ::std::vector<Environment*> iuEnvironmentList;
protected:
UnitTestImpl() : m_total_test_num(0), m_disable_num(0), m_should_run_num(0)
Expand Down

0 comments on commit 6d0e3f3

Please sign in to comment.