Skip to content

Commit

Permalink
update r799
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Mar 17, 2015
1 parent c8b5636 commit 73fd7c1
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/CommonMakefile.in
Expand Up @@ -11,6 +11,7 @@ TARGETS = iutest_all_tests \
iutest_environment_tests \
iutest_filter_tests \
iutest_help_tests \
iutest_list_test_tests \
iutest_listener_tests \
iutest_invalid_commandline_tests \
iutest_minimum_tests \
Expand Down
9 changes: 8 additions & 1 deletion test/GNUmakefile
Expand Up @@ -8,7 +8,7 @@

#
# Flags passed to the C++ compiler.
CCFLAGS += -g -Wall -Wextra -Werror -Wno-unused-local-typedefs
CCFLAGS += -g -Wall -Wextra -Werror
CCFLAGS += $(DEFS) $(STDFLAG)

ifdef OUTPUTXML
Expand All @@ -20,6 +20,13 @@ COVERAGE = coveralls
CCFLAGS += -coverage
endif

#
# GCC
#
ifeq ($(CXX),g++)
CCFLAGS += -Wno-unused-local-typedefs
endif

MAKEFILE=GNUmakefile CommonMakefile.in

#
Expand Down
73 changes: 73 additions & 0 deletions test/iutest_list_test_tests.c
@@ -0,0 +1,73 @@
/*======================================================================
----------------------------------------------------------------------*/
/**
* @file iutest_list_test_tests.c
* @brief list up commandline option test
*
* @author t.sirayanagi
* @par copyright
* Copyright (C) 2015, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
/*----------------------------------------------------------------------
======================================================================*/

/* include ===========================================================*/
#include "../include/iutest_c.h"

#ifdef UNICODE
# define DECAL_ARGV(cmd) wchar_t* targv[] = { argv[0], L cmd }
# define DECAL_ARGV_BEGIN() wchar_t* targv[] = { argv[0]
# define DECAL_ARGV_PARAM(cmd) , L cmd
#else
# define DECAL_ARGV(cmd) char* targv[] = { argv[0], cmd }
# define DECAL_ARGV_BEGIN() char* targv[] = { argv[0]
# define DECAL_ARGV_PARAM(cmd) , cmd
#endif
#define DECAL_ARGV_END() };


IUTEST_C_WORKSPACE();

IUTEST(Test, A)
{
}

#if IUTEST_C_HAS_PARAM_TEST

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

IUTEST_P(int, TestP, A)
{
IUTEST_UNUSED_VAR(param);
}

IUTEST_P(int, TestP, B)
{
IUTEST_UNUSED_VAR(param);
}

#endif


#ifdef UNICODE
int wmain(int argc, wchar_t* argv[])
#else
int main(int argc, char* argv[])
#endif
{
int targc = 2;
DECAL_ARGV("--iutest_list_tests");
IUTEST_UNUSED_VAR(argc);
IUTEST_UNUSED_VAR(argv);

#if defined(OUTPUTXML)
// 失敗テストを含むので xml 出力しない
IUTEST_FLAG(output) = NULL;
#endif

IUTEST_INIT(&targc, targv);
IUTEST_EXPECT_EQ(1, targc);
return IUTEST_RUN_ALL_TESTS();
}

0 comments on commit 73fd7c1

Please sign in to comment.