Skip to content

Commit

Permalink
update r738
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Nov 7, 2014
1 parent 1d57184 commit 2be8fa6
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 9 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ install:
# lcov
- if [ "${USE_COVERAGE}" = 'lcov' ]; then sudo apt-get install lcov rubygems; fi
- if [ "${USE_COVERAGE}" = 'lcov' ]; then gem install lcoveralls; fi
# gtest
- if [ "${USE_GTEST}" = '1' ]; then sudo apt-get -qq install cmake; fi
- if [ "${USE_GTEST}" = '1' ]; then sudo apt-get -qq install libgtest-dev; fi
- if [ "${USE_GTEST}" = '1' ]; then cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/; cd -; fi

script:
- cd ./test
Expand Down Expand Up @@ -65,8 +61,6 @@ matrix:
env: USE_FUSE=fuse_min
- compiler: gcc
env: USE_FUSE=fuse_min STDFLAG=-std=c++98
- compiler: gcc
env: USE_GTEST=1
- compiler: gcc
env: COVERITY_SCAN=1
addons:
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
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.10.99.36
PROJECT_NUMBER = 1.10.99.37

# 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
2 changes: 2 additions & 0 deletions include/impl/iutest_default_xml_generator.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ IUTEST_IPP_INLINE bool DefaultXmlGeneratorListener::FileOpen(const char* path)
{
fprintf(stderr, "Unable to open file \"%s\".\n", m_output_path.c_str());
fflush(stderr);
detail::IFileSystem::Free(m_fp);
m_fp = NULL;
return false;
}
return true;
Expand Down
4 changes: 2 additions & 2 deletions include/iutest_ver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

//======================================================================
// define
#define IUTEST_VER 0x01109936u //!< iutest version 1.10.99.36
#define IUTEST_VER 0x01109937u //!< iutest version 1.10.99.37
#define IUTEST_MAJORVER 0x01u //!< Major Version
#define IUTEST_MINORVER 0x10u //!< Minor Version
#define IUTEST_BUILD 0x99u //!< Build
#define IUTEST_REVISION 0x36u //!< Revision
#define IUTEST_REVISION 0x37u //!< Revision

/**
* @mainpage
Expand Down
1 change: 1 addition & 0 deletions test/CommonMakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ TARGETS_IUTEST_ONLY = \
iutest_env_var_tests \
iutest_env_var_gtest_tests \
iutest_ostream_formatter_tests \
iutest_output_xml_invalid_path_tests \
iutest_tap_printer_listener_tests \
iutest_type_param_tests_strict \
iutest_unit_tests \
Expand Down
65 changes: 65 additions & 0 deletions test/iutest_output_xml_invalid_path_tests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//======================================================================
//-----------------------------------------------------------------------
/**
* @file iutest_output_xml_tests.cpp
* @brief xml 出力対応テスト
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2013-2014, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
//-----------------------------------------------------------------------
//======================================================================

//======================================================================
// include
#include "iutest.hpp"

#if IUTEST_HAS_STREAMCAPTURE

::iutest::detail::IUStreamCapture stderr_capture(stderr);

#endif

#if !defined(IUTEST_USE_GTEST)
# define OUTPUT_XML_TEST 1
#else
# define OUTPUT_XML_TEST 0
#endif

IUTEST(Foo, Bar)
{
IUTEST_ASSERT_EQ(3, 3);
}

#ifdef UNICODE
int wmain(int argc, wchar_t* argv[])
#else
int main(int argc, char* argv[])
#endif
{
#if OUTPUT_XML_TEST
IUTEST_INIT(&argc, argv);

::iutest::IUTEST_FLAG(output) = "xml:invalid_path?/test.xml";

{
const int ret = IUTEST_RUN_ALL_TESTS();

if( ret != 0 ) return 1;
#if IUTEST_HAS_STREAMCAPTURE && IUTEST_HAS_ASSERTION_RETURN
IUTEST_ASSERT_STRIN("Unable to open file \"invalid_path?/test.xml\".", stderr_capture.GetStreamString())
<< ::iutest::AssertionReturn<int>(1);
#endif
}

printf("*** Successful ***\n");
#else
(void)argc;
(void)argv;
printf("*** OUTPUT_XML_TEST=0 ***\n");
#endif
return 0;
}

0 comments on commit 2be8fa6

Please sign in to comment.