Skip to content

Commit

Permalink
update r802
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Mar 28, 2015
1 parent 0c63325 commit 22d3831
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/Doxyfile
Expand Up @@ -32,7 +32,7 @@ PROJECT_NAME = iutest_c
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 1.5.0.4
PROJECT_NUMBER = 1.5.0.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
Expand Down
2 changes: 1 addition & 1 deletion include/impl/iutest_core_c.inl
Expand Up @@ -500,7 +500,7 @@ IUTEST_C_INL_INLINE IUTEST_ATTRIBUTE_UNUSED_ void iuUnitTest_ParamHolderRegister
test_case->teardown = p->teardown;
test_case->flag = 0;
test_case->param = ((char*)curr->params + curr->align*i);
if( iuString_IsDisabledTestName(test_case->name) )
if( iuString_IsDisabledTestName(curr->testcase_base_name) )
{
test_case->flag |= IUTESTCASE_DISABLED;
}
Expand Down
6 changes: 3 additions & 3 deletions include/iutest_ver_c.h
Expand Up @@ -16,19 +16,19 @@
#define INCG_IRIS_IUTEST_VER_C_H_D65CB7A7_D2AD_40FE_8F5F_8FBF376A0010_

/* define ============================================================*/
#define IUTEST_C_VER 0x01050004 /*!< iutest version 1.5.0.4 */
#define IUTEST_C_VER 0x01050005 /*!< iutest version 1.5.0.5 */
#define IUTEST_C_MAJORVER 0x01 /*!< Major Version */
#define IUTEST_C_MINORVER 0x05 /*!< Minor Version */
#define IUTEST_C_BUILD 0x00 /*!< Build */
#define IUTEST_C_REVISION 0x04 /*!< Revision */
#define IUTEST_C_REVISION 0x05 /*!< Revision */

/**
* @mainpage
* @sa @b ProjectHome \n
* sourceforge : http://sourceforge.jp/projects/iutest/ \n
*
* @par copyright
* Copyright (C) 2012-2014, Takazumi Shirayanagi\n
* Copyright (C) 2012-2015, Takazumi Shirayanagi\n
* This software is released under the new BSD License.
*
* @par LICENSE
Expand Down
30 changes: 30 additions & 0 deletions test/iutest_disabled_tests.c
Expand Up @@ -38,6 +38,25 @@ IUTEST(Foo, Bar_DISABLED_)
IUTEST_ASSERT_RVALUE_EQ(3, 3);
}

#if IUTEST_C_HAS_PARAM_TEST

IUTEST_INSTANTIATE_TEST_CASE_P(int, A, TestP, iuValues, 0, 1, 2, 3 );
IUTEST_INSTANTIATE_TEST_CASE_P(int, A, DISABLED_TestP, iuValues, 0, 1, 2, 3 );

IUTEST_P(int, TestP, DISABLED_Test)
{
const int x = param;
IUTEST_ASSERT_RVALUE_EQ(10, x);
}

IUTEST_P(int, DISABLED_TestP, Test)
{
const int x = param;
IUTEST_ASSERT_RVALUE_EQ(10, x);
}

#endif

#ifdef UNICODE
int wmain(int argc, wchar_t* argv[])
#else
Expand All @@ -52,17 +71,28 @@ int main(int argc, char* argv[])
{
const int ret = IUTEST_RUN_ALL_TESTS();
if( ret != 0 ) return 1;
#if IUTEST_C_HAS_PARAM_TEST
IUTEST_ASSERT( iuUnitTest_GetDisableTestCount(iuUnitTest_GetInstance()) == 10 );
#else
IUTEST_ASSERT( iuUnitTest_GetDisableTestCount(iuUnitTest_GetInstance()) == 2 );
#endif
}

{
int ret = 0;
IUTEST_FLAG(also_run_disabled_tests) = TRUE;
ret = IUTEST_RUN_ALL_TESTS();
#if IUTEST_C_HAS_PARAM_TEST
IUTEST_ASSERT( iuUnitTest_GetDisableTestCount(iuUnitTest_GetInstance()) == 10 );
IUTEST_ASSERT( iuUnitTest_GetTestToRunCount(iuUnitTest_GetInstance()) == 12 );
IUTEST_ASSERT( iuUnitTest_GetFailureTestCount(iuUnitTest_GetInstance()) == 10 );
IUTEST_ASSERT( iuUnitTest_GetTotalTestCount(iuUnitTest_GetInstance()) == 12 );
#else
IUTEST_ASSERT( iuUnitTest_GetDisableTestCount(iuUnitTest_GetInstance()) == 2 );
IUTEST_ASSERT( iuUnitTest_GetTestToRunCount(iuUnitTest_GetInstance()) == 4 );
IUTEST_ASSERT( iuUnitTest_GetFailureTestCount(iuUnitTest_GetInstance()) == 2 );
IUTEST_ASSERT( iuUnitTest_GetTotalTestCount(iuUnitTest_GetInstance()) == 4 );
#endif
if( ret == 0 ) return 1;
}

Expand Down

0 comments on commit 22d3831

Please sign in to comment.