Merge branch 'develop'
git@719644331e2372b28f4e01a512e14413b70be6f4
https://github.com/srz-zumix/iutest/commit/719644331e2372b28f4e01a512e14413b70be6f4
@@ -11,10 +11,10 @@ | ||
11 | 11 | apt: &apt-global |
12 | 12 | sources: &apt-common-sources |
13 | 13 | - ubuntu-toolchain-r-test |
14 | - #- llvm-toolchain-trusty-5.0 | |
14 | + - llvm-toolchain-trusty-5.0 | |
15 | 15 | - llvm-toolchain-trusty |
16 | 16 | packages: &apt-common-packages |
17 | - - clang-6.0 | |
17 | + - clang-5.0 | |
18 | 18 | - g++-7 |
19 | 19 | - gcc-7 |
20 | 20 | #- cppcheck |
@@ -79,7 +79,10 @@ | ||
79 | 79 | export CCOV=gcov-7 |
80 | 80 | fi |
81 | 81 | # clang |
82 | - - if [ "${CXX}" = 'clang++' ]; then export CXX=clang++-6.0; fi | |
82 | + - | | |
83 | + if [ "${CXX}" = 'clang++' ]; then | |
84 | + export CXX=clang++-5.0; | |
85 | + fi | |
83 | 86 | # mingw |
84 | 87 | - if [ "${MINGW}" = '1' ]; then export CXX=i686-w64-mingw32-g++; fi |
85 | 88 | # winegcc |
@@ -162,19 +165,19 @@ | ||
162 | 165 | - *apt-cmake-packages |
163 | 166 | - google-mock |
164 | 167 | # MinGW |
165 | - - compiler: gcc | |
166 | - env: MINGW=1 HOST=WINE DEFS="-DIUTEST_HAS_STREAM_BUFFER=0" | |
167 | - addons: | |
168 | - apt: | |
169 | - sources: | |
170 | - - *apt-common-sources | |
171 | - #- ppa:ubuntu-wine/ppa | |
172 | - packages: | |
173 | - - *apt-common-packages | |
174 | - - wine | |
175 | - - binutils-mingw-w64-i686 | |
176 | - - gcc-mingw-w64-i686 | |
177 | - - g++-mingw-w64-i686 | |
168 | + # - compiler: gcc | |
169 | + # env: MINGW=1 HOST=WINE DEFS="-DIUTEST_HAS_STREAM_BUFFER=0" | |
170 | + # addons: | |
171 | + # apt: | |
172 | + # sources: | |
173 | + # - *apt-common-sources | |
174 | + # #- ppa:ubuntu-wine/ppa | |
175 | + # packages: | |
176 | + # - *apt-common-packages | |
177 | + # - wine | |
178 | + # - binutils-mingw-w64-i686 | |
179 | + # - gcc-mingw-w64-i686 | |
180 | + # - g++-mingw-w64-i686 | |
178 | 181 | # Use Lib |
179 | 182 | - compiler: gcc |
180 | 183 | env: USE_LIB=1 |
@@ -1,4 +1,4 @@ | ||
1 | -Copyright (c) 2011-2017, Takazumi Shirayanagi | |
1 | +Copyright (c) 2011-2018, Takazumi Shirayanagi | |
2 | 2 | All rights reserved. |
3 | 3 | |
4 | 4 | Redistribution and use in source and binary forms, with or without |
@@ -127,7 +127,7 @@ | ||
127 | 127 | License |
128 | 128 | -------------------------------------------------- |
129 | 129 | |
130 | - Copyright (c) 2011-2017, Takazumi Shirayanagi, | |
130 | + Copyright (c) 2011-2018, Takazumi Shirayanagi, | |
131 | 131 | All rights reserved. |
132 | 132 | |
133 | 133 | This software is released under the New(3-clause) BSD License, see LICENSE |
@@ -94,7 +94,7 @@ | ||
94 | 94 | This software is released under the <a href="http://opensource.org/licenses/BSD-3-Clause">New(3-clause) BSD License</a>.<br /> |
95 | 95 | |
96 | 96 | <pre> |
97 | -Copyright (c) 2011-2017, Takazumi Shirayanagi | |
97 | +Copyright (c) 2011-2018, Takazumi Shirayanagi | |
98 | 98 | All rights reserved. |
99 | 99 | |
100 | 100 |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2012-2016, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2012-2018, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -206,7 +206,6 @@ | ||
206 | 206 | template<typename U, typename Type, bool is_const> |
207 | 207 | class peep_member_object_impl |
208 | 208 | { |
209 | - typedef peep_member_object_impl<U, Type, false> _Myt; | |
210 | 209 | typedef Type value_type; |
211 | 210 | private: |
212 | 211 | U* m_ptr; |
@@ -216,12 +215,11 @@ | ||
216 | 215 | peep_member_object_impl(const peep_member_object_impl&); |
217 | 216 | public: |
218 | 217 | operator value_type () const { return (*m_ptr).*detail::peep_tag<peep_tag>::value; } |
219 | - _Myt& operator = (const value_type& value); | |
218 | + peep_member_object_impl& operator = (const value_type& value) IUTEST_CXX_DELETED_FUNCTION; | |
220 | 219 | }; |
221 | 220 | template<typename U, typename Type> |
222 | 221 | class peep_member_object_impl<U, Type, false> |
223 | 222 | { |
224 | - typedef peep_member_object_impl<U, Type, false> _Myt; | |
225 | 223 | typedef Type value_type; |
226 | 224 | private: |
227 | 225 | U* m_ptr; |
@@ -232,7 +230,7 @@ | ||
232 | 230 | public: |
233 | 231 | operator value_type () const { return (*m_ptr).*detail::peep_tag<peep_tag>::value; } |
234 | 232 | operator value_type& () { return (*m_ptr).*detail::peep_tag<peep_tag>::value; } |
235 | - _Myt& operator = (const value_type& value) | |
233 | + peep_member_object_impl& operator = (const value_type& value) | |
236 | 234 | { |
237 | 235 | (*m_ptr).*detail::peep_tag<peep_tag>::value = value; |
238 | 236 | return *this; |
@@ -255,7 +253,6 @@ | ||
255 | 253 | template<typename U, typename Type, bool Func> |
256 | 254 | class peep_static_impl |
257 | 255 | { |
258 | - typedef peep_static_impl<U, Type, Func> _Myt; | |
259 | 256 | typedef typename type_traits::remove_pointer<Type>::type value_type; |
260 | 257 | public: |
261 | 258 | peep_static_impl() {} |
@@ -264,7 +261,7 @@ | ||
264 | 261 | public: |
265 | 262 | operator value_type () const { return *detail::peep_tag<peep_tag>::value; } |
266 | 263 | operator value_type& () { return *detail::peep_tag<peep_tag>::value; } |
267 | - _Myt& operator = (const value_type& value) | |
264 | + peep_static_impl& operator = (const value_type& value) | |
268 | 265 | { |
269 | 266 | *detail::peep_tag<peep_tag>::value = value; |
270 | 267 | return *this; |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2011-2017, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2011-2018, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -17,11 +17,11 @@ | ||
17 | 17 | |
18 | 18 | //====================================================================== |
19 | 19 | // define |
20 | -#define IUTEST_VER 0x01160200u //!< iutest version 1.16.2.00 | |
20 | +#define IUTEST_VER 0x01160201u //!< iutest version 1.16.2.1 | |
21 | 21 | #define IUTEST_MAJORVER 0x01u //!< Major Version |
22 | 22 | #define IUTEST_MINORVER 0x16u //!< Minor Version |
23 | 23 | #define IUTEST_MICROVER 0x02u //!< Micro Version |
24 | -#define IUTEST_REVISION 0x00u //!< Revision | |
24 | +#define IUTEST_REVISION 0x01u //!< Revision | |
25 | 25 | |
26 | 26 | #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated |
27 | 27 |
@@ -33,7 +33,7 @@ | ||
33 | 33 | * google group: https://groups.google.com/forum/?fromgroups#!forum/g-iutest \n |
34 | 34 | * |
35 | 35 | * @par copyright |
36 | - * Copyright (C) 2011-2017, Takazumi Shirayanagi\n | |
36 | + * Copyright (C) 2011-2018, Takazumi Shirayanagi\n | |
37 | 37 | * This software is released under the new BSD License. |
38 | 38 | * |
39 | 39 | * @par LICENSE |
@@ -1,8 +1,8 @@ | ||
1 | -######################################################################## | |
1 | +?ソ######################################################################## | |
2 | 2 | # CMake build script for iutest. |
3 | 3 | # |
4 | 4 | |
5 | -# CMake バージョン | |
5 | +# CMake 繝舌?繧ク繝ァ繝ウ | |
6 | 6 | cmake_minimum_required(VERSION 3.0.2) |
7 | 7 | |
8 | 8 | # option |
@@ -20,7 +20,7 @@ | ||
20 | 20 | # |
21 | 21 | # Project-wide settings |
22 | 22 | |
23 | -# プロジェクト名 | |
23 | +# 繝励Ο繧ク繧ァ繧ッ繝亥錐 | |
24 | 24 | project(iutest CXX C) |
25 | 25 | |
26 | 26 | if (COMMAND set_up_hermetic_build) |
@@ -31,7 +31,7 @@ | ||
31 | 31 | include(internal_utils.cmake) |
32 | 32 | config_compiler_and_linker() # Defined in internal_utils.cmake. |
33 | 33 | |
34 | -# インクルードパス | |
34 | +# 繧、繝ウ繧ッ繝ォ繝シ繝峨ヱ繧ケ | |
35 | 35 | include_directories( |
36 | 36 | ${PROJECT_SOURCE_DIR}/../../include |
37 | 37 | ) |
@@ -39,7 +39,7 @@ | ||
39 | 39 | |
40 | 40 | ######################################################################## |
41 | 41 | # |
42 | -# ライブラリ | |
42 | +# 繝ゥ繧、繝悶Λ繝ェ | |
43 | 43 | # |
44 | 44 | cxx_library(iutest "${cxx_strict}" ../../src/iutest_all.cpp) |
45 | 45 | cxx_library(iutest_main "${cxx_strict}" ../../src/iutest_main.cpp) |
@@ -46,7 +46,7 @@ | ||
46 | 46 | |
47 | 47 | ######################################################################## |
48 | 48 | # |
49 | -# サンプル | |
49 | +# 繧オ繝ウ繝励Ν | |
50 | 50 | # |
51 | 51 | cxx_executable_sample(iutest_sample |
52 | 52 | ../../samples/main.cpp |
@@ -63,7 +63,7 @@ | ||
63 | 63 | |
64 | 64 | ######################################################################## |
65 | 65 | # |
66 | -# gtest サンプル | |
66 | +# gtest 繧オ繝ウ繝励Ν | |
67 | 67 | # |
68 | 68 | if (build_gtest_samples) |
69 | 69 | cxx_executable_gtest_sample(sample1_unittest ../../samples/gtest sample1.cc main.cc) |
@@ -121,7 +121,20 @@ | ||
121 | 121 | cxx_executable_test(exception_assertion_tests) |
122 | 122 | cxx_executable_test(exception_tests) |
123 | 123 | cxx_executable_test(expression_assertion_tests) |
124 | - cxx_executable_test(extension_tests) | |
124 | + cxx_executable_test_with_main(extension_tests | |
125 | + concat_tests.cpp | |
126 | + fixture_alias_tests.cpp | |
127 | + ignore_tests.cpp | |
128 | + package_tests1.cpp | |
129 | + package_tests2.cpp | |
130 | + pairwise_tests.cpp | |
131 | + param_method_tests.cpp | |
132 | + param_test_with_any_tests.cpp | |
133 | + pp_tests.cpp | |
134 | + random_values_tests.cpp | |
135 | + values_gen_tests.cpp | |
136 | + variadic_templates_tests.cpp | |
137 | + ) | |
125 | 138 | cxx_executable_test(file_system_tests) |
126 | 139 | cxx_executable_test(filter_tests) |
127 | 140 | cxx_executable_test(flagfile_gtest_tests) |
@@ -1,6 +1,6 @@ | ||
1 | 1 | @echo off |
2 | 2 | |
3 | -SET VCVERSION=14 | |
3 | +SET VCVERSION=15 | |
4 | 4 | SET DIRNAME=vc%VCVERSION% |
5 | 5 | |
6 | 6 | pushd . |
@@ -48,6 +48,25 @@ | ||
48 | 48 | |
49 | 49 | ALLTESTS_TARGET=all_tests |
50 | 50 | |
51 | +EXTENSIONTESTS_TEST_SRCS= \ | |
52 | + concat_tests.cpp \ | |
53 | + fixture_alias_tests.cpp \ | |
54 | + ignore_tests.cpp \ | |
55 | + package_tests1.cpp \ | |
56 | + package_tests2.cpp \ | |
57 | + pairwise_tests.cpp \ | |
58 | + param_method_tests.cpp \ | |
59 | + param_test_with_any_tests.cpp \ | |
60 | + pp_tests.cpp \ | |
61 | + random_values_tests.cpp \ | |
62 | + values_gen_tests.cpp \ | |
63 | + variadic_templates_tests.cpp \ | |
64 | + | |
65 | +EXTENSIONTESTS_SRCS= main.cpp \ | |
66 | + $(EXTENSIONTESTS_TEST_SRCS) | |
67 | + | |
68 | +EXTENSIONTESTS_TARGET=extension_tests | |
69 | + | |
51 | 70 | NAMESPACETESTS_TARGET=namespace_tests |
52 | 71 | |
53 | 72 | TARGETS1= \ |
@@ -63,7 +82,6 @@ | ||
63 | 82 | exception_assertion_tests \ |
64 | 83 | exception_tests \ |
65 | 84 | expression_assertion_tests \ |
66 | - extension_tests \ | |
67 | 85 | file_system_tests \ |
68 | 86 | filter_tests \ |
69 | 87 | flagfile_gtest_tests \ |
@@ -33,7 +33,7 @@ | ||
33 | 33 | # |
34 | 34 | !include <CommonMakefile.in> |
35 | 35 | |
36 | -RUN_TARGETS = $(ALLTESTS_TARGET) $(NAMESPACETESTS_TARGET) $(TARGETS1) $(TARGETS2) $(TARGETS_IUTEST_ONLY) | |
36 | +RUN_TARGETS = $(ALLTESTS_TARGET) $(EXTENSIONTESTS_TARGET) $(NAMESPACETESTS_TARGET) $(TARGETS1) $(TARGETS2) $(TARGETS_IUTEST_ONLY) | |
37 | 37 | BUILD_TARGETS = $(RUN_TARGETS) $(BUILD_ONLY) $(COMPILEERROR_TARGETS) |
38 | 38 | TARGETS = $(BUILD_TARGETS) |
39 | 39 |
@@ -100,6 +100,9 @@ | ||
100 | 100 | $(ALLTESTS_TARGET) : $(ALLTESTS_SRCS) $(IUTEST_HEADERS) Makefile |
101 | 101 | $(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) /Fe$@ $(ALLTESTS_SRCS) $(LDFLAGS) |
102 | 102 | |
103 | +$(EXTENSIONTESTS_TARGET) : $(EXTENSIONTESTS_SRCS) $(IUTEST_HEADERS) Makefile | |
104 | + $(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) /Fe$@ $(EXTENSIONTESTS_SRCS) $(LDFLAGS) | |
105 | + | |
103 | 106 | $(NAMESPACETESTS_TARGET) : $(NAMESPACETESTS_SRCS) $(IUTEST_HEADERS) Makefile |
104 | 107 | $(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) /Fe$@ $(NAMESPACETESTS_SRCS) $(LDFLAGS) |
105 | 108 |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2012-2016, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2012-2018, Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -143,7 +143,10 @@ | ||
143 | 143 | IUTEST_EXPECT_EQ(10, s_prod.GetX()); |
144 | 144 | |
145 | 145 | IUTEST_EXPECT_EQ(10, prod_class_x); |
146 | +} | |
146 | 147 | |
148 | +IUTEST(PeepClassTest, PeepObject2) | |
149 | +{ | |
147 | 150 | IUTEST_PEEP(ProdClass2, m_x) prod_class2_x(&s_prod2); |
148 | 151 | prod_class2_x = 54; |
149 | 152 | IUTEST_EXPECT_EQ(54, s_prod2.GetX()); |
@@ -6,7 +6,7 @@ | ||
6 | 6 | * |
7 | 7 | * @author t.shirayanagi |
8 | 8 | * @par copyright |
9 | - * Copyright (C) 2014-2016, Takazumi Shirayanagi\n | |
9 | + * Copyright (C) 2014-2018 Takazumi Shirayanagi\n | |
10 | 10 | * This software is released under the new BSD License, |
11 | 11 | * see LICENSE |
12 | 12 | */ |
@@ -20,6 +20,9 @@ | ||
20 | 20 | namespace syntax_gtest_tests |
21 | 21 | { |
22 | 22 | |
23 | +IUTEST_PRAGMA_WARN_PUSH() | |
24 | +IUTEST_PRAGMA_WARN_DISABLE_DANGLING_ELSE() | |
25 | + | |
23 | 26 | TEST(GTestSyntaxTest, True) |
24 | 27 | { |
25 | 28 | if( bool b = true ) |
@@ -464,4 +467,6 @@ | ||
464 | 467 | |
465 | 468 | #endif |
466 | 469 | |
470 | +IUTEST_PRAGMA_WARN_POP() | |
471 | + | |
467 | 472 | } // end of namespace syntax_gtest_tests |