• R/O
  • SSH
  • HTTPS

iutest: Commit


Commit MetaInfo

Revision1264 (tree)
Time2017-08-11 23:37:58
Authorsrz_zumix

Log Message

Merge branch 'develop'

git@eb82265f96e76133d5e0d8b79e588c7dc38ebffc
https://github.com/srz-zumix/iutest/commit/eb82265f96e76133d5e0d8b79e588c7dc38ebffc

Change Summary

Incremental Difference

--- trunk/appveyor.yml (revision 1263)
+++ trunk/appveyor.yml (revision 1264)
@@ -1,87 +1,47 @@
11 version: 1.0.{build}
2-os:
3-- Visual Studio 2015
4-- Visual Studio 2013
2+environment:
3+ matrix:
4+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
5+ PROJECT_DIR: msvc12
6+ CMAKE_GENERATOR_NAME: Visual Studio 12 2013
7+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
8+ PROJECT_DIR: msvc14
9+ CMAKE_GENERATOR_NAME: Visual Studio 14 2015
10+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
11+ PROJECT_DIR: msvc15
12+ CMAKE_GENERATOR_NAME: Visual Studio 15 2017
13+
514 configuration:
6-- Debug
7-- Release
8-init:
9-- cmd:
15+ - Debug
16+ - Release
17+
18+before_build:
19+ - cmd: >-
20+ mkdir build && cd build
21+
22+ cmake ../projects/cmake -G "%CMAKE_GENERATOR_NAME%" -Dbuild_gtest_samples=ON
23+
24+ cd ..
25+
1026 build:
11- project: projects\msvc12\iutest.sln
27+ project: build\iutest.sln
1228 parallel: true
1329 verbosity: minimal
30+
1431 after_build:
15-- cmd: >-
16- "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
32+ - cmd: >-
33+ xcopy /S /Y /Q test\testdata build\%Configuration%\testdata\
1734
18-
19- cd test
20-
21- nmake
22-
23- cd ../
2435 test_script:
25-- cmd: >-
26- cd projects/msvc12
36+ - cmd: >-
37+ cd build\%Configuration%
2738
28- %Configuration%\iutest_sample.exe
39+ for %%a in (*.exe) do %%a || exit /b 1
2940
30- if errorlevel 1 exit /b 1
31-
32-
33- cd %Configuration%
34-
35- gtest1.exe
36-
37- if errorlevel 1 exit /b 1
38-
39- gtest2.exe
40-
41- if errorlevel 1 exit /b 1
42-
43- gtest3.exe
44-
45- if errorlevel 1 exit /b 1
46-
47- gtest4.exe
48-
49- if errorlevel 1 exit /b 1
50-
51- gtest5.exe
52-
53- if errorlevel 1 exit /b 1
54-
55- gtest6.exe
56-
57- if errorlevel 1 exit /b 1
58-
59- gtest7.exe
60-
61- if errorlevel 1 exit /b 1
62-
63- gtest8.exe
64-
65- if errorlevel 1 exit /b 1
66-
67- gtest9.exe --terse_output
68-
69- if errorlevel 1 exit /b 1
70-
71- gtest10.exe
72-
73- if errorlevel 1 exit /b 1
74-
75- cd ../../../
76-
77-
78- cd test
79-
80- nmake test
8141 notifications:
82-- provider: Email
83- to:
84- - zumix.cpp@gmail.com
85- on_build_success: false
86- on_build_failure: true
87- on_build_status_changed: true
\ No newline at end of file
42+ - provider: Email
43+ to:
44+ - zumix.cpp@gmail.com
45+ on_build_success: false
46+ on_build_failure: true
47+ on_build_status_changed: true
--- trunk/include/internal/iutest_charcode.hpp (revision 1263)
+++ trunk/include/internal/iutest_charcode.hpp (revision 1264)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2011-2016, Takazumi Shirayanagi\n
9+ * Copyright (C) 2011-2017, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -57,18 +57,34 @@
5757 * @param [in] num = 入力バッファサイズ
5858 * @return マルチバイト文字列
5959 */
60+::std::string WideStringToUTF8(const char16_t* str, int num=-1);
61+
62+/**
63+ * @brief ワイド文字列からマルチバイトへ変換
64+ * @param [in] str = 入力
65+ * @param [in] num = 入力バッファサイズ
66+ * @return マルチバイト文字列
67+*/
6068 ::std::string WideStringToMultiByteString(const char16_t* str, int num=-1);
6169
6270 #endif
6371
64-#if IUTEST_HAS_CHAR32_T && (IUTEST_HAS_CXX_HDR_CUCHAR || IUTEST_HAS_CXX_HDR_CODECVT)
72+#if IUTEST_HAS_CHAR32_T
6573
6674 /**
67-* @brief ワイド文字列からマルチバイトへ変換
68-* @param [in] str = 入力
69-* @param [in] num = 入力バッファサイズ
70-* @return マルチバイト文字列
75+ * @brief ワイド文字列からマルチバイトへ変換
76+ * @param [in] str = 入力
77+ * @param [in] num = 入力バッファサイズ
78+ * @return マルチバイト文字列
7179 */
80+::std::string WideStringToUTF8(const char32_t* str, int num = -1);
81+
82+/**
83+ * @brief ワイド文字列からマルチバイトへ変換
84+ * @param [in] str = 入力
85+ * @param [in] num = 入力バッファサイズ
86+ * @return マルチバイト文字列
87+*/
7288 ::std::string WideStringToMultiByteString(const char32_t* str, int num = -1);
7389
7490 #endif
--- trunk/include/internal/iutest_compiler.hpp (revision 1263)
+++ trunk/include/internal/iutest_compiler.hpp (revision 1264)
@@ -858,7 +858,7 @@
858858
859859 //! explicit instantiation access checking
860860 #if !defined(IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_MEMBER_FUNCTION)
861-# if defined(_MSC_VER) && ((_MSC_VER < 1600) || (_MSC_VER == 1900 && defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190024210))
861+# if defined(_MSC_VER) && ((_MSC_VER < 1600) || (_MSC_VER == 1900))
862862 // VS2008 以前では、private なメンバー関数に explicit instantiation でもアクセスできない
863863 # define IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_MEMBER_FUNCTION 0
864864 # else
@@ -868,7 +868,7 @@
868868
869869 //! explicit instantiation access checking (static member function)
870870 #if !defined(IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_STATIC_MEMBER_FUNCTION)
871-# if defined(_MSC_VER) && ((_MSC_VER < 1900) || (defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190024210))
871+# if defined(_MSC_VER) && (_MSC_VER < 1910)
872872 // Visual Studio では、private な static メンバー関数に explicit instantiation でもアクセスできない
873873 # define IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_STATIC_MEMBER_FUNCTION 0
874874 # else
--- trunk/include/iutest_ver.hpp (revision 1263)
+++ trunk/include/iutest_ver.hpp (revision 1264)
@@ -17,11 +17,11 @@
1717
1818 //======================================================================
1919 // define
20-#define IUTEST_VER 0x01160113u //!< iutest version 1.16.1.13
20+#define IUTEST_VER 0x01160115u //!< iutest version 1.16.1.15
2121 #define IUTEST_MAJORVER 0x01u //!< Major Version
2222 #define IUTEST_MINORVER 0x16u //!< Minor Version
2323 #define IUTEST_MICROVER 0x01u //!< Micro Version
24-#define IUTEST_REVISION 0x13u //!< Revision
24+#define IUTEST_REVISION 0x15u //!< Revision
2525
2626 #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated
2727
--- trunk/projects/cmake/CMakeLists.txt (revision 1263)
+++ trunk/projects/cmake/CMakeLists.txt (revision 1264)
@@ -66,14 +66,14 @@
6666 # gtest サンプル
6767 #
6868 if (build_gtest_samples)
69- cxx_executable_gtest_sample(sample1_unittest ../../samples/gtest sample1.cc)
70- cxx_executable_gtest_sample(sample2_unittest ../../samples/gtest sample2.cc)
71- cxx_executable_gtest_sample(sample3_unittest ../../samples/gtest )
72- cxx_executable_gtest_sample(sample4_unittest ../../samples/gtest sample4.cc)
73- cxx_executable_gtest_sample(sample5_unittest ../../samples/gtest sample1.cc)
74- cxx_executable_gtest_sample(sample6_unittest ../../samples/gtest )
75- cxx_executable_gtest_sample(sample7_unittest ../../samples/gtest )
76- cxx_executable_gtest_sample(sample8_unittest ../../samples/gtest )
69+ cxx_executable_gtest_sample(sample1_unittest ../../samples/gtest sample1.cc main.cc)
70+ cxx_executable_gtest_sample(sample2_unittest ../../samples/gtest sample2.cc main.cc)
71+ cxx_executable_gtest_sample(sample3_unittest ../../samples/gtest main.cc)
72+ cxx_executable_gtest_sample(sample4_unittest ../../samples/gtest sample4.cc main.cc)
73+ cxx_executable_gtest_sample(sample5_unittest ../../samples/gtest sample1.cc main.cc)
74+ cxx_executable_gtest_sample(sample6_unittest ../../samples/gtest main.cc)
75+ cxx_executable_gtest_sample(sample7_unittest ../../samples/gtest main.cc)
76+ cxx_executable_gtest_sample(sample8_unittest ../../samples/gtest main.cc)
7777 cxx_executable_gtest_sample(sample9_unittest ../../samples/gtest )
7878 cxx_executable_gtest_sample(sample10_unittest ../../samples/gtest )
7979 endif()
--- trunk/projects/cmake/exsample.bat (revision 1263)
+++ trunk/projects/cmake/exsample.bat (revision 1264)
@@ -3,6 +3,7 @@
33 SET VCVERSION=14
44 SET DIRNAME=vc%VCVERSION%
55
6+pushd .
67 if not exist tmp mkdir tmp
78 cd tmp
89 if errorlevel 1 goto end
@@ -10,7 +11,8 @@
1011 cd %DIRNAME%
1112 if errorlevel 1 goto end
1213
13-cmake -G "Visual Studio %VCVERSION%" ../../
14+cmake -G "Visual Studio %VCVERSION%" ../../ %*
1415
1516 :end
17+popd
1618 pause
--- trunk/samples/printto.cpp (revision 1263)
+++ trunk/samples/printto.cpp (revision 1264)
@@ -6,7 +6,7 @@
66 *
77 * @author t.shirayanagi
88 * @par copyright
9- * Copyright (C) 2014-2016, Takazumi Shirayanagi\n
9+ * Copyright (C) 2014-2017, Takazumi Shirayanagi\n
1010 * This software is released under the new BSD License,
1111 * see LICENSE
1212 */
@@ -14,7 +14,6 @@
1414 //======================================================================
1515 #include "../include/iutest.hpp"
1616
17-
1817 /* ---------------------------------------------------
1918 * PrintTo
2019 *//*--------------------------------------------------*/
--- trunk/test/Makefile (revision 1263)
+++ trunk/test/Makefile (revision 1264)
@@ -83,6 +83,15 @@
8383 @echo } >> $@
8484
8585
86+# Compile error test.
87+
88+IUTEST_COMPILE_ERROR_TEST_OPTION=-c $(CXX)
89+!if "$(CI)" == "true"
90+IUTEST_COMPILE_ERROR_TEST_OPTION+= --verbose
91+!endif
92+
93+
94+
8695 #
8796 # Builds a sample test.
8897
@@ -99,5 +108,5 @@
99108
100109 $(COMPILEERROR_TARGETS) : $(IUTEST_HEADERS) Makefile
101110 # -$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) /Fe$@ $@.cpp $(LDFLAGS)
102- $(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) /Fe$@ $@.cpp $(LDFLAGS) | python ../tools/python/iutest_compile_error_test.py -c $(CXX) --verbose
111+ $(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) /Fe$@ $@.cpp $(LDFLAGS) | python ../tools/python/iutest_compile_error_test.py $(IUTEST_COMPILE_ERROR_TEST_OPTION)
103112
--- trunk/test/configcheck/Makefile (revision 1263)
+++ trunk/test/configcheck/Makefile (revision 1264)
@@ -1,3 +1,20 @@
1+# iutest root directory
2+IUTEST_DIR = ../..
3+IUTEST_INCLUDE = -I$(IUTEST_DIR)/include
4+
5+# All iutest headers. Usually you shouldn't change this
6+# definition.
7+IUTEST_HEADERS = $(IUTEST_DIR)/include/*.hpp \
8+ $(IUTEST_DIR)/include/impl/*.ipp \
9+ $(IUTEST_DIR)/include/internal/*.hpp \
10+ $(IUTEST_DIR)/include/listener/*.hpp \
11+ $(IUTEST_DIR)/include/util/*.hpp \
12+ $(IUTEST_DIR)/include/gtest/*.hpp \
13+ $(IUTEST_DIR)/include/gtest/switch/*.hpp
14+
15+TESTS_SOURCES = ../*.cpp \
16+ ../*.hpp
17+
118 MAKE_OPTION=--no-print-directory -C ../ -j4
219
320 DISABLE_FEATURE_CONFIG= \
@@ -108,7 +125,7 @@
108125 $(MAKE) $(MAKE_OPTION) clean
109126 $(RM) $(TARGETS)
110127
111-%.dis :
128+%.dis : $(IUTEST_HEADERS) $(TESTS_SOURCES) $(MAKEFILE)
112129 @echo $(@:%.dis=%)
113130 $(MAKE) $(MAKE_OPTION) clean
114131 $(MAKE) $(MAKE_OPTION) DEFS=-D$(@:%.dis=%)=0
@@ -115,7 +132,7 @@
115132 $(MAKE) $(MAKE_OPTION) run DEFS=-D$(@:%.dis=%)=0
116133 @echo ok > $@
117134
118-%.no :
135+%.no : $(IUTEST_HEADERS) $(TESTS_SOURCES) $(MAKEFILE)
119136 @echo $(@:%.no=%)
120137 $(MAKE) $(MAKE_OPTION) clean
121138 $(MAKE) $(MAKE_OPTION) DEFS=-D$(@:%.no=%)
@@ -122,12 +139,12 @@
122139 $(MAKE) $(MAKE_OPTION) run DEFS=-D$(@:%.no=%)
123140 @echo ok > $@
124141
125-no_parame_and_type_test:
142+no_parame_and_type_test: $(IUTEST_HEADERS) $(TESTS_SOURCES) $(MAKEFILE)
126143 $(MAKE) $(MAKE_OPTION) clean
127144 $(MAKE) $(MAKE_OPTION) DEFS="-DIUTEST_HAS_TYPED_TEST=0 -DIUTEST_HAS_PARAM_TEST=0 -DIUTEST_HAS_TYPED_TEST_P=0 -DIUTEST_HAS_VARIADIC_PRED=0"
128145 $(MAKE) $(MAKE_OPTION) run DEFS="-DIUTEST_HAS_TYPED_TEST=0 -DIUTEST_HAS_PARAM_TEST=0 -DIUTEST_HAS_TYPED_TEST_P=0 -DIUTEST_HAS_VARIADIC_PRED=0"
129146
130-strstream:
147+strstream: $(IUTEST_HEADERS) $(TESTS_SOURCES) $(MAKEFILE)
131148 $(MAKE) $(MAKE_OPTION) clean
132149 $(MAKE) $(MAKE_OPTION) DEFS="-DIUTEST_HAS_STRINGSTREAM=0 -DIUTEST_HAS_STRSTREAM=1" CXXFLAGS="-Wno-deprecated"
133150 $(MAKE) $(MAKE_OPTION) run DEFS="-DIUTEST_HAS_STRINGSTREAM=0 -DIUTEST_HAS_STRSTREAM=1" CXXFLAGS="-Wno-deprecated"
Show on old repository browser