• R/O
  • SSH
  • HTTPS

iutest: Commit


Commit MetaInfo

Revision1328 (tree)
Time2018-07-28 23:24:36
Authorsrz_zumix

Log Message

Merge remote-tracking branch 'origin/develop'

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


Merge remote-tracking branch 'origin/develop'

git@38a61402f9f591fb0ec5b59b7a68929bf328c3a8


update vscode workspace

git@c02cf77d57f23b19896123861aa69bafea71df6c


support variadic macro in IUTEST_*_NULL/IUTEST_*_NOTNULL #38

git@715c8f0b3bfb8bcef93c37f707486656fabb0351


update buddy.yml

git@03fa101ee7f4db2c7a06cd5a4d0d1ffc513bbf1d


add xcode cxx detect util

git@db299232197f85504e3e30e6a1f92a29b6b4049e

Change Summary

Incremental Difference

--- trunk/README.md (revision 1327)
+++ trunk/README.md (revision 1328)
@@ -22,10 +22,12 @@
2222
2323 iutest
2424 ==========
25+
2526 iutest - iris unit test framework
2627
2728 Welcome to the iutest
2829 --------------------------------------------------
30+
2931 iutest is framework for writing C++ tests.
3032
3133 Features
@@ -54,7 +56,7 @@
5456 * Private member test.
5557 * Janaese test name (C++03).
5658 * Various options for running the tests.
57-* Compatible with [Google Test](https://github.com/google/googletest).
59+* Compatible with [Google Test](https://github.com/google/googletest). (1.5 or later)
5860
5961 Platforms
6062 --------------------------------------------------
@@ -69,10 +71,10 @@
6971 --------------------------------------------------
7072
7173 * in repository
72-doc/index.html
74+ doc/index.html
7375 * online document
74-[least released version(OSDN)](http://iutest.osdn.jp/doc/index.html)
75-[github master branch (gh-pages)](http://srz-zumix.github.io/iutest/)
76+ [least released version(OSDN)](http://iutest.osdn.jp/doc/index.html)
77+ [github master branch (gh-pages)](http://srz-zumix.github.io/iutest/)
7678
7779 Project page
7880 --------------------------------------------------
@@ -90,11 +92,11 @@
9092 --------------------------------------------------
9193
9294 * fused
93-make fused-src.
95+ make fused-src.
9496 * twilio
95-notifies the test results using twilio
97+ notifies the test results using twilio
9698 * wandbox
97-tools to make use of the iutest in [wandbox](https://wandbox.org/)
99+ tools to make use of the iutest in [wandbox](https://wandbox.org/)
98100
99101 Tests
100102 --------------------------------------------------
@@ -116,7 +118,8 @@
116118 | |[![Build Status](https://app.bitrise.io/app/aefa67ee488094b1/status.svg?token=aDrRgkZEmNFmsDjBM9fWTw&branch=master)](https://app.bitrise.io/app/aefa67ee488094b1)|[![Build Status](https://app.bitrise.io/app/aefa67ee488094b1/status.svg?token=aDrRgkZEmNFmsDjBM9fWTw&branch=develop)](https://app.bitrise.io/app/aefa67ee488094b1)|Android|
117119 |CircleCI |[![CircleCI](https://circleci.com/gh/srz-zumix/iutest/tree/master.svg?style=svg)](https://circleci.com/gh/srz-zumix/iutest/tree/master)|[![CircleCI](https://circleci.com/gh/srz-zumix/iutest/tree/develop.svg?style=svg)](https://circleci.com/gh/srz-zumix/iutest/tree/develop)|Optimize options test|
118120 |Cirrus CI |[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=master)](https://cirrus-ci.com/github/srz-zumix/iutest/master)|[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=develop)](https://cirrus-ci.com/github/srz-zumix/iutest/develop)|g++ std=c++14,17...|
119-|Buddy |[![buddy branch](https://app.buddy.works/zumixcpp/iutest/repository/branch/master/badge.svg?token=5e58135ab4831252209e7b1fe75bfe9de669b0dc7e95ed4316eebad2187d59a0 "buddy branch")](https://app.buddy.works/zumixcpp/iutest/repository/branch/master)|[![buddy branch](https://app.buddy.works/zumixcpp/iutest/repository/branch/develop/badge.svg?token=5e58135ab4831252209e7b1fe75bfe9de669b0dc7e95ed4316eebad2187d59a0 "buddy branch")](https://app.buddy.works/zumixcpp/iutest/repository/branch/develop)|arm-none-eabi-gcc build|
121+|Buddy |[![buddy branch](https://app.buddy.works/zumixcpp/iutest/repository/branch/master/badge.svg?token=5e58135ab4831252209e7b1fe75bfe9de669b0dc7e95ed4316eebad2187d59a0 "buddy branch")](https://app.buddy.works/zumixcpp/iutest/repository/branch/master)|[![buddy branch](https://app.buddy.works/zumixcpp/iutest/repository/branch/develop/badge.svg?token=5e58135ab4831252209e7b1fe75bfe9de669b0dc7e95ed4316eebad2187d59a0 "buddy branch")](https://app.buddy.works/zumixcpp/iutest/repository/branch/develop)|arm-none-eabi-gcc build, and below|
122+||[![buddy pipeline](https://app.buddy.works/zumixcpp/iutest/pipelines/pipeline/145531/badge.svg?token=5e58135ab4831252209e7b1fe75bfe9de669b0dc7e95ed4316eebad2187d59a0 "buddy pipeline")](https://app.buddy.works/zumixcpp/iutest/pipelines/pipeline/145531)|-|gtest comaptible test for released versions|
120123 | |-|[![buddy pipeline](https://app.buddy.works/zumixcpp/iutest/pipelines/pipeline/129694/badge.svg?token=5e58135ab4831252209e7b1fe75bfe9de669b0dc7e95ed4316eebad2187d59a0 "buddy pipeline")](https://app.buddy.works/zumixcpp/iutest/pipelines/pipeline/129694)|gtest version detect test|
121124 |Scrutinizer|[![Scrutinizer Build Status](https://scrutinizer-ci.com/g/srz-zumix/iutest/badges/build.png?b=master)](https://scrutinizer-ci.com/g/srz-zumix/iutest/build-status/master)|[![Scrutinizer Build Status](https://scrutinizer-ci.com/g/srz-zumix/iutest/badges/build.png?b=develop)](https://scrutinizer-ci.com/g/srz-zumix/iutest/build-status/develop)|iuwandbox tests|
122125 |INSPECODE |[![Job Status](https://inspecode.rocro.com/badges/github.com/srz-zumix/iutest/status?token=wt0KUnRUG1-Ul2mLrg8ComR1RznZV3VoXecBJHW0EIk&branch=master)](https://inspecode.rocro.com/jobs/github.com/srz-zumix/iutest/latest?completed=true&branch=master)|[![Job Status](https://inspecode.rocro.com/badges/github.com/srz-zumix/iutest/status?token=wt0KUnRUG1-Ul2mLrg8ComR1RznZV3VoXecBJHW0EIk&branch=develop)](https://inspecode.rocro.com/jobs/github.com/srz-zumix/iutest/latest?completed=true&branch=develop)|Spell check, Cppcheck, cpplint, metrics, scan-build|
--- trunk/buddy.yml (revision 1327)
+++ trunk/buddy.yml (revision 1328)
@@ -225,6 +225,7 @@
225225 trigger_condition: "ALWAYS"
226226 - action: "release-1.4.0"
227227 type: "BUILD"
228+ disabled: true
228229 working_directory: "/buddy/iutest"
229230 docker_image_name: "srzzumix/googletest"
230231 docker_image_tag: "release-1.4.0"
--- trunk/test/syntax_tests.cpp (revision 1327)
+++ trunk/test/syntax_tests.cpp (revision 1328)
@@ -21,6 +21,16 @@
2121 namespace syntax_tests
2222 {
2323
24+#ifndef IUTEST_NO_VARIADIC_MACROS
25+
26+template<int A, int B>struct T
27+{
28+ template<typename U>
29+ static U call(U v) { return v; }
30+};
31+
32+#endif
33+
2434 IUTEST_PRAGMA_WARN_PUSH()
2535 IUTEST_PRAGMA_WARN_DISABLE_DANGLING_ELSE()
2636
@@ -36,6 +46,20 @@
3646 IUTEST_ASSUME_TRUE(b) << b;
3747 }
3848
49+#ifndef IUTEST_NO_VARIADIC_MACROS
50+IUTEST(SyntaxTest, VariadicTrue)
51+{
52+ if( bool b = true )
53+ IUTEST_ASSERT_TRUE(T<0, 0>::call(b)) << b;
54+ if( bool b = true )
55+ IUTEST_EXPECT_TRUE(T<0, 0>::call(b)) << b;
56+ if( bool b = true )
57+ IUTEST_INFORM_TRUE(T<0, 0>::call(b)) << b;
58+ if( bool b = true )
59+ IUTEST_ASSUME_TRUE(T<0, 0>::call(b)) << b;
60+}
61+#endif
62+
3963 IUTEST(SyntaxTest, False)
4064 {
4165 if( bool b = false )
@@ -48,6 +72,22 @@
4872 IUTEST_ASSUME_FALSE(b) << b;
4973 }
5074
75+#ifndef IUTEST_NO_VARIADIC_MACROS
76+
77+IUTEST(SyntaxTest, VariadicFalse)
78+{
79+ if( bool b = false )
80+ IUTEST_ASSERT_FALSE(T<0, 0>::call(b)) << b;
81+ if( bool b = false )
82+ IUTEST_EXPECT_FALSE(T<0, 0>::call(b)) << b;
83+ if( bool b = false )
84+ IUTEST_INFORM_FALSE(T<0, 0>::call(b)) << b;
85+ if( bool b = false )
86+ IUTEST_ASSUME_FALSE(T<0, 0>::call(b)) << b;
87+}
88+
89+#endif
90+
5191 IUTEST(SyntaxTest, EQ)
5292 {
5393 if( int x = 1 )
@@ -199,6 +239,21 @@
199239 IUTEST_ASSUME_NULL(p) << x;
200240 }
201241
242+#ifndef IUTEST_NO_VARIADIC_MACROS
243+IUTEST(SyntaxTest, VariadicNull)
244+{
245+ int* p = NULL;
246+ if( int x = 1 )
247+ IUTEST_ASSERT_NULL(T<0, 0>::call(p)) << x;
248+ if( int x = 1 )
249+ IUTEST_EXPECT_NULL(T<0, 0>::call(p)) << x;
250+ if( int x = 1 )
251+ IUTEST_INFORM_NULL(T<0, 0>::call(p)) << x;
252+ if( int x = 1 )
253+ IUTEST_ASSUME_NULL(T<0, 0>::call(p)) << x;
254+}
255+#endif
256+
202257 IUTEST(SyntaxTest, NotNull)
203258 {
204259 if( void* p = this )
@@ -211,6 +266,20 @@
211266 IUTEST_ASSUME_NOTNULL(p) << p;
212267 }
213268
269+#ifndef IUTEST_NO_VARIADIC_MACROS
270+IUTEST(SyntaxTest, VariadicNotNull)
271+{
272+ if( void* p = this )
273+ IUTEST_ASSERT_NOTNULL(T<0, 0>::call(p)) << p;
274+ if( void* p = this )
275+ IUTEST_EXPECT_NOTNULL(T<0, 0>::call(p)) << p;
276+ if( void* p = this )
277+ IUTEST_INFORM_NOTNULL(T<0, 0>::call(p)) << p;
278+ if( void* p = this )
279+ IUTEST_ASSUME_NOTNULL(T<0, 0>::call(p)) << p;
280+}
281+#endif
282+
214283 IUTEST(SyntaxTest, Same)
215284 {
216285 int v = 0;
@@ -303,6 +372,20 @@
303372 IUTEST_ASSUME_HRESULT_SUCCEEDED(0) << x;
304373 }
305374
375+#ifndef IUTEST_NO_VARIADIC_MACROS
376+IUTEST(SyntaxTest, VariadicHResultSucceeded)
377+{
378+ if( int x=1 )
379+ IUTEST_ASSERT_HRESULT_SUCCEEDED(T<0, 0>::call(0)) << x;
380+ if( int x=1 )
381+ IUTEST_EXPECT_HRESULT_SUCCEEDED(T<0, 0>::call(0)) << x;
382+ if( int x=1 )
383+ IUTEST_INFORM_HRESULT_SUCCEEDED(T<0, 0>::call(0)) << x;
384+ if( int x=1 )
385+ IUTEST_ASSUME_HRESULT_SUCCEEDED(T<0, 0>::call(0)) << x;
386+}
387+#endif
388+
306389 IUTEST(SyntaxTest, HResultFailed)
307390 {
308391 if( int x=1 )
@@ -315,8 +398,22 @@
315398 IUTEST_ASSUME_HRESULT_FAILED(-1) << x;
316399 }
317400
401+#ifndef IUTEST_NO_VARIADIC_MACROS
402+IUTEST(SyntaxTest, VariadicHResultFailed)
403+{
404+ if( int x=1 )
405+ IUTEST_ASSERT_HRESULT_FAILED(T<0, 0>::call(-1)) << x;
406+ if( int x=1 )
407+ IUTEST_EXPECT_HRESULT_FAILED(T<0, 0>::call(-1)) << x;
408+ if( int x=1 )
409+ IUTEST_INFORM_HRESULT_FAILED(T<0, 0>::call(-1)) << x;
410+ if( int x=1 )
411+ IUTEST_ASSUME_HRESULT_FAILED(T<0, 0>::call(-1)) << x;
412+}
318413 #endif
319414
415+#endif
416+
320417 IUTEST(SyntaxTest, Pred1)
321418 {
322419 if( int x=1 )
@@ -581,9 +678,9 @@
581678 if( int x = 1 )
582679 IUTEST_ASSERT_ANY_THROW(throw ::std::bad_exception()) << x;
583680 if( int x = 1 )
584- IUTEST_ASSERT_ANY_THROW(throw ::std::bad_exception()) << x;
681+ IUTEST_EXPECT_ANY_THROW(throw ::std::bad_exception()) << x;
585682 if( int x = 1 )
586- IUTEST_ASSERT_ANY_THROW(throw ::std::bad_exception()) << x;
683+ IUTEST_INFORM_ANY_THROW(throw ::std::bad_exception()) << x;
587684 if( int x = 1 )
588685 IUTEST_ASSUME_ANY_THROW(throw ::std::bad_exception()) << x;
589686 }
--- trunk/include/iutest_ver.hpp (revision 1327)
+++ trunk/include/iutest_ver.hpp (revision 1328)
@@ -17,11 +17,11 @@
1717
1818 //======================================================================
1919 // define
20-#define IUTEST_VER 0x01160406u //!< iutest version 1.16.4.6
20+#define IUTEST_VER 0x01160408u //!< iutest version 1.16.4.8
2121 #define IUTEST_MAJORVER 0x01u //!< Major Version
2222 #define IUTEST_MINORVER 0x16u //!< Minor Version
2323 #define IUTEST_MICROVER 0x04u //!< Micro Version
24-#define IUTEST_REVISION 0x06u //!< Revision
24+#define IUTEST_REVISION 0x08u //!< Revision
2525
2626 #define IUTEST_BUILD IUTEST_MICROVER //!< @deprecated
2727
@@ -122,6 +122,8 @@
122122 <ul>
123123 <li>v1.16.5.0
124124 <ul>
125+ <li>IUTEST_*_NULL, IUTEST_*_NOTNULL を可変長引数対応</li>
126+ <li>IUTEST_*_HRESULT_SUCCEEDED, IUTEST_*_HRESULT_FAILED を可変長引数対応</li>
125127 <li>ad_hoc_testresult の取得関数名を ad_hoc_test_result に変更</li>
126128 <li>compatibility: iuutil に ad_hoc_testresult の取得関数を追加</li>
127129 <li>iuwandbox で std-cxx の指定をするとオプションチェックで失敗する不具合を修正</li>
--- trunk/include/gtest/switch/iutest_switch_expect.hpp (revision 1327)
+++ trunk/include/gtest/switch/iutest_switch_expect.hpp (revision 1328)
@@ -165,8 +165,8 @@
165165 #define IUTEST_EXPECT_GT EXPECT_GT
166166 #define IUTEST_EXPECT_GE EXPECT_GE
167167 #define IUTEST_EXPECT_NEAR EXPECT_NEAR
168-#define IUTEST_EXPECT_NULL(v) EXPECT_EQ(NULL, v)
169-#define IUTEST_EXPECT_NOTNULL(v) EXPECT_TRUE(NULL != (v))
168+#define IUTEST_EXPECT_NULL(...) EXPECT_EQ(NULL, (__VA_ARGS__))
169+#define IUTEST_EXPECT_NOTNULL(...) EXPECT_TRUE(NULL != (__VA_ARGS__))
170170 #define IUTEST_EXPECT_SAME(v1, v2) EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSame, v1, v2)
171171 #define IUTEST_EXPECT_FLOAT_EQ EXPECT_FLOAT_EQ
172172 #define IUTEST_EXPECT_DOUBLE_EQ EXPECT_DOUBLE_EQ
@@ -180,8 +180,8 @@
180180 #define IUTEST_EXPECT_NO_FATAL_FAILURE EXPECT_NO_FATAL_FAILURE
181181
182182 #ifdef GTEST_OS_WINDOWS
183-# define IUTEST_EXPECT_HRESULT_SUCCEEDED EXPECT_HRESULT_SUCCEEDED
184-# define IUTEST_EXPECT_HRESULT_FAILED EXPECT_HRESULT_FAILED
183+# define IUTEST_EXPECT_HRESULT_SUCCEEDED(...) EXPECT_HRESULT_SUCCEEDED((__VA_ARGS__))
184+# define IUTEST_EXPECT_HRESULT_FAILED(...) EXPECT_HRESULT_FAILED((__VA_ARGS__))
185185 #endif
186186
187187 #define IUTEST_EXPECT_PRED1 EXPECT_PRED1
--- trunk/include/gtest/switch/iutest_switch_inform.hpp (revision 1327)
+++ trunk/include/gtest/switch/iutest_switch_inform.hpp (revision 1328)
@@ -203,8 +203,8 @@
203203 #define IUTEST_INFORM_LE INFORM_LE
204204 #define IUTEST_INFORM_GT INFORM_GT
205205 #define IUTEST_INFORM_GE INFORM_GE
206-#define IUTEST_INFORM_NULL(v) INFORM_EQ(NULL, v)
207-#define IUTEST_INFORM_NOTNULL(v) INFORM_TRUE(NULL != (v))
206+#define IUTEST_INFORM_NULL(...) INFORM_EQ(NULL, (__VA_ARGS__))
207+#define IUTEST_INFORM_NOTNULL(...) INFORM_TRUE(NULL != (__VA_ARGS__))
208208 #define IUTEST_INFORM_SAME(v1, v2) INFORM_PRED_FORMAT2(::testing::internal::CmpHelperSame, v1, v2)
209209 #define IUTEST_INFORM_NEAR INFORM_NEAR
210210 #define IUTEST_INFORM_FLOAT_EQ INFORM_FLOAT_EQ
@@ -219,10 +219,10 @@
219219 #define IUTEST_INFORM_NO_FATAL_FAILURE INFORM_NO_FATAL_FAILURE
220220
221221 #ifdef GTEST_OS_WINDOWS
222-# define INFORM_HRESULT_SUCCEEDED(expr) \
223- INFORM_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
224-# define INFORM_HRESULT_FAILED(expr) \
225- INFORM_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
222+# define INFORM_HRESULT_SUCCEEDED(...) \
223+ INFORM_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (__VA_ARGS__))
224+# define INFORM_HRESULT_FAILED(...) \
225+ INFORM_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (__VA_ARGS__))
226226
227227 # define IUTEST_INFORM_HRESULT_SUCCEEDED INFORM_HRESULT_SUCCEEDED
228228 # define IUTEST_INFORM_HRESULT_FAILED INFORM_HRESULT_FAILED
--- trunk/include/gtest/switch/iutest_switch_assume.hpp (revision 1327)
+++ trunk/include/gtest/switch/iutest_switch_assume.hpp (revision 1328)
@@ -196,8 +196,8 @@
196196 #define IUTEST_ASSUME_LE ASSUME_LE
197197 #define IUTEST_ASSUME_GT ASSUME_GT
198198 #define IUTEST_ASSUME_GE ASSUME_GE
199-#define IUTEST_ASSUME_NULL(v) ASSUME_EQ(NULL, v)
200-#define IUTEST_ASSUME_NOTNULL(v) ASSUME_TRUE(NULL != (v))
199+#define IUTEST_ASSUME_NULL(...) ASSUME_EQ(NULL, (__VA_ARGS__))
200+#define IUTEST_ASSUME_NOTNULL(...) ASSUME_TRUE(NULL != (__VA_ARGS__))
201201 #define IUTEST_ASSUME_SAME(v1, v2) ASSUME_PRED_FORMAT2(::testing::internal::CmpHelperSame, v1, v2)
202202 #define IUTEST_ASSUME_NEAR ASSUME_NEAR
203203 #define IUTEST_ASSUME_FLOAT_EQ ASSUME_FLOAT_EQ
@@ -212,10 +212,10 @@
212212 #define IUTEST_ASSUME_NO_FATAL_FAILURE ASSUME_NO_FATAL_FAILURE
213213
214214 #ifdef GTEST_OS_WINDOWS
215-# define ASSUME_HRESULT_SUCCEEDED(expr) \
216- ASSUME_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
217-# define ASSUME_HRESULT_FAILED(expr) \
218- ASSUME_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
215+# define ASSUME_HRESULT_SUCCEEDED(...) \
216+ ASSUME_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (__VA_ARGS__))
217+# define ASSUME_HRESULT_FAILED(...) \
218+ ASSUME_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (__VA_ARGS__))
219219
220220 # define IUTEST_ASSUME_HRESULT_SUCCEEDED ASSUME_HRESULT_SUCCEEDED
221221 # define IUTEST_ASSUME_HRESULT_FAILED ASSUME_HRESULT_FAILED
--- trunk/include/gtest/switch/iutest_switch_assert.hpp (revision 1327)
+++ trunk/include/gtest/switch/iutest_switch_assert.hpp (revision 1328)
@@ -164,8 +164,8 @@
164164 #define IUTEST_ASSERT_GT ASSERT_GT
165165 #define IUTEST_ASSERT_GE ASSERT_GE
166166 #define IUTEST_ASSERT_NEAR ASSERT_NEAR
167-#define IUTEST_ASSERT_NULL(v) IUTEST_THROUGH_ANALYSIS_ASSUME((v) == NULL, ASSERT_EQ(NULL, v))
168-#define IUTEST_ASSERT_NOTNULL(v) IUTEST_THROUGH_ANALYSIS_ASSUME((v) != NULL, ASSERT_TRUE(NULL != (v)))
167+#define IUTEST_ASSERT_NULL(...) IUTEST_THROUGH_ANALYSIS_ASSUME((__VA_ARGS__) == NULL, ASSERT_EQ(NULL, (__VA_ARGS__)))
168+#define IUTEST_ASSERT_NOTNULL(...) IUTEST_THROUGH_ANALYSIS_ASSUME((__VA_ARGS__) != NULL, ASSERT_TRUE(NULL != (__VA_ARGS__)))
169169 #define IUTEST_ASSERT_SAME(v1, v2) ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSame, v1, v2)
170170 #define IUTEST_ASSERT_FLOAT_EQ ASSERT_FLOAT_EQ
171171 #define IUTEST_ASSERT_DOUBLE_EQ ASSERT_DOUBLE_EQ
@@ -179,8 +179,8 @@
179179 #define IUTEST_ASSERT_NO_FATAL_FAILURE ASSERT_NO_FATAL_FAILURE
180180
181181 #ifdef GTEST_OS_WINDOWS
182-# define IUTEST_ASSERT_HRESULT_SUCCEEDED ASSERT_HRESULT_SUCCEEDED
183-# define IUTEST_ASSERT_HRESULT_FAILED ASSERT_HRESULT_FAILED
182+# define IUTEST_ASSERT_HRESULT_SUCCEEDED(...) ASSERT_HRESULT_SUCCEEDED((__VA_ARGS__))
183+# define IUTEST_ASSERT_HRESULT_FAILED(...) ASSERT_HRESULT_FAILED((__VA_ARGS__))
184184 #endif
185185
186186 #define IUTEST_ASSERT_PRED1 ASSERT_PRED1
--- trunk/include/iutest.hpp (revision 1327)
+++ trunk/include/iutest.hpp (revision 1328)
@@ -349,7 +349,11 @@
349349 * @details v が NULL であることを検証します
350350 */
351351 #ifndef IUTEST_ASSERT_NULL
352-# define IUTEST_ASSERT_NULL(v) IUTEST_TEST_NULL(v, IUTEST_ASSERT_FAILURE)
352+# ifndef IUTEST_NO_VARIADIC_MACROS
353+# define IUTEST_ASSERT_NULL(...) IUTEST_TEST_NULL((__VA_ARGS__), IUTEST_ASSERT_FAILURE)
354+# else
355+# define IUTEST_ASSERT_NULL(v) IUTEST_TEST_NULL(v, IUTEST_ASSERT_FAILURE)
356+# endif
353357 #endif
354358 /**
355359 * @ingroup IUTEST_ASSERT_
@@ -357,7 +361,11 @@
357361 * @details v が NULL でないことを検証します
358362 */
359363 #ifndef IUTEST_ASSERT_NOTNULL
360-# define IUTEST_ASSERT_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_ASSERT_FAILURE)
364+# ifndef IUTEST_NO_VARIADIC_MACROS
365+# define IUTEST_ASSERT_NOTNULL(...) IUTEST_TEST_NOTNULL((__VA_ARGS__), IUTEST_ASSERT_FAILURE)
366+# else
367+# define IUTEST_ASSERT_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_ASSERT_FAILURE)
368+# endif
361369 #endif
362370
363371 /**
@@ -441,7 +449,11 @@
441449 * @details HRESULT が成功であることを検証します
442450 */
443451 #ifndef IUTEST_ASSERT_HRESULT_SUCCEEDED
444-# define IUTEST_ASSERT_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_ASSERT_FAILURE)
452+# ifndef IUTEST_NO_VARIADIC_MACROS
453+# define IUTEST_ASSERT_HRESULT_SUCCEEDED(...) IUTEST_TEST_HRESULT_SUCCEEDED((__VA_ARGS__), IUTEST_ASSERT_FAILURE)
454+# else
455+# define IUTEST_ASSERT_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_ASSERT_FAILURE)
456+# endif
445457 #endif
446458 /**
447459 * @ingroup IUTEST_ASSERT_
@@ -449,7 +461,11 @@
449461 * @details HRESULT が失敗であることを検証します
450462 */
451463 #ifndef IUTEST_ASSERT_HRESULT_FAILED
452-# define IUTEST_ASSERT_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_ASSERT_FAILURE)
464+# ifndef IUTEST_NO_VARIADIC_MACROS
465+# define IUTEST_ASSERT_HRESULT_FAILED(...) IUTEST_TEST_HRESULT_FAILED((__VA_ARGS__), IUTEST_ASSERT_FAILURE)
466+# else
467+# define IUTEST_ASSERT_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_ASSERT_FAILURE)
468+# endif
453469 #endif
454470
455471 #if IUTEST_HAS_EXCEPTIONS
@@ -703,7 +719,11 @@
703719 * @details v が NULL であることを検証します
704720 */
705721 #ifndef IUTEST_EXPECT_NULL
706-# define IUTEST_EXPECT_NULL(v) IUTEST_TEST_NULL(v, IUTEST_EXPECT_FAILURE)
722+# ifndef IUTEST_NO_VARIADIC_MACROS
723+# define IUTEST_EXPECT_NULL(...) IUTEST_TEST_NULL((__VA_ARGS__), IUTEST_EXPECT_FAILURE)
724+# else
725+# define IUTEST_EXPECT_NULL(v) IUTEST_TEST_NULL(v, IUTEST_EXPECT_FAILURE)
726+# endif
707727 #endif
708728 /**
709729 * @ingroup IUTEST_EXPECT_
@@ -711,7 +731,11 @@
711731 * @details v が NULL でないことを検証します
712732 */
713733 #ifndef IUTEST_EXPECT_NOTNULL
714-# define IUTEST_EXPECT_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_EXPECT_FAILURE)
734+# ifndef IUTEST_NO_VARIADIC_MACROS
735+# define IUTEST_EXPECT_NOTNULL(...) IUTEST_TEST_NOTNULL((__VA_ARGS__), IUTEST_EXPECT_FAILURE)
736+# else
737+# define IUTEST_EXPECT_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_EXPECT_FAILURE)
738+# endif
715739 #endif
716740
717741 /**
@@ -795,7 +819,11 @@
795819 * @details HRESULT が成功であることを検証します
796820 */
797821 #ifndef IUTEST_EXPECT_HRESULT_SUCCEEDED
798-# define IUTEST_EXPECT_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_EXPECT_FAILURE)
822+# ifndef IUTEST_NO_VARIADIC_MACROS
823+# define IUTEST_EXPECT_HRESULT_SUCCEEDED(...) IUTEST_TEST_HRESULT_SUCCEEDED((__VA_ARGS__), IUTEST_EXPECT_FAILURE)
824+# else
825+# define IUTEST_EXPECT_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_EXPECT_FAILURE)
826+# endif
799827 #endif
800828 /**
801829 * @ingroup IUTEST_EXPECT_
@@ -803,7 +831,11 @@
803831 * @details HRESULT が失敗であることを検証します
804832 */
805833 #ifndef IUTEST_EXPECT_HRESULT_FAILED
806-# define IUTEST_EXPECT_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_EXPECT_FAILURE)
834+# ifndef IUTEST_NO_VARIADIC_MACROS
835+# define IUTEST_EXPECT_HRESULT_FAILED(...) IUTEST_TEST_HRESULT_FAILED((__VA_ARGS__), IUTEST_EXPECT_FAILURE)
836+# else
837+# define IUTEST_EXPECT_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_EXPECT_FAILURE)
838+# endif
807839 #endif
808840
809841 #if IUTEST_HAS_EXCEPTIONS
@@ -1067,7 +1099,11 @@
10671099 * @details v が NULL であることを検証します
10681100 */
10691101 #ifndef IUTEST_INFORM_NULL
1070-# define IUTEST_INFORM_NULL(v) IUTEST_TEST_NULL(v, IUTEST_INFORM_FAILURE)
1102+# ifndef IUTEST_NO_VARIADIC_MACROS
1103+# define IUTEST_INFORM_NULL(...) IUTEST_TEST_NULL((__VA_ARGS__), IUTEST_INFORM_FAILURE)
1104+# else
1105+# define IUTEST_INFORM_NULL(v) IUTEST_TEST_NULL(v, IUTEST_INFORM_FAILURE)
1106+# endif
10711107 #endif
10721108 /**
10731109 * @ingroup IUTEST_INFORM_
@@ -1075,7 +1111,11 @@
10751111 * @details v が NULL でないことを検証します
10761112 */
10771113 #ifndef IUTEST_INFORM_NOTNULL
1078-# define IUTEST_INFORM_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_INFORM_FAILURE)
1114+# ifndef IUTEST_NO_VARIADIC_MACROS
1115+# define IUTEST_INFORM_NOTNULL(...) IUTEST_TEST_NOTNULL((__VA_ARGS__), IUTEST_INFORM_FAILURE)
1116+# else
1117+# define IUTEST_INFORM_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_INFORM_FAILURE)
1118+# endif
10791119 #endif
10801120
10811121 /**
@@ -1159,7 +1199,11 @@
11591199 * @details HRESULT が成功であることを検証します
11601200 */
11611201 #ifndef IUTEST_INFORM_HRESULT_SUCCEEDED
1162-# define IUTEST_INFORM_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_INFORM_FAILURE)
1202+# ifndef IUTEST_NO_VARIADIC_MACROS
1203+# define IUTEST_INFORM_HRESULT_SUCCEEDED(...) IUTEST_TEST_HRESULT_SUCCEEDED((__VA_ARGS__), IUTEST_INFORM_FAILURE)
1204+# else
1205+# define IUTEST_INFORM_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_INFORM_FAILURE)
1206+# endif
11631207 #endif
11641208 /**
11651209 * @ingroup IUTEST_INFORM_
@@ -1167,7 +1211,11 @@
11671211 * @details HRESULT が失敗であることを検証します
11681212 */
11691213 #ifndef IUTEST_INFORM_HRESULT_FAILED
1170-# define IUTEST_INFORM_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_INFORM_FAILURE)
1214+# ifndef IUTEST_NO_VARIADIC_MACROS
1215+# define IUTEST_INFORM_HRESULT_FAILED(...) IUTEST_TEST_HRESULT_FAILED((__VA_ARGS__), IUTEST_INFORM_FAILURE)
1216+# else
1217+# define IUTEST_INFORM_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_INFORM_FAILURE)
1218+# endif
11711219 #endif
11721220
11731221 #if IUTEST_HAS_EXCEPTIONS
@@ -1413,7 +1461,11 @@
14131461 * @details v が NULL であることを検証します
14141462 */
14151463 #ifndef IUTEST_ASSUME_NULL
1416-# define IUTEST_ASSUME_NULL(v) IUTEST_TEST_NULL(v, IUTEST_ASSUME_FAILURE)
1464+# ifndef IUTEST_NO_VARIADIC_MACROS
1465+# define IUTEST_ASSUME_NULL(...) IUTEST_TEST_NULL((__VA_ARGS__), IUTEST_ASSUME_FAILURE)
1466+# else
1467+# define IUTEST_ASSUME_NULL(v) IUTEST_TEST_NULL(v, IUTEST_ASSUME_FAILURE)
1468+# endif
14171469 #endif
14181470 /**
14191471 * @ingroup IUTEST_ASSUME_
@@ -1421,7 +1473,11 @@
14211473 * @details v が NULL でないことを検証します
14221474 */
14231475 #ifndef IUTEST_ASSUME_NOTNULL
1424-# define IUTEST_ASSUME_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_ASSUME_FAILURE)
1476+# ifndef IUTEST_NO_VARIADIC_MACROS
1477+# define IUTEST_ASSUME_NOTNULL(...) IUTEST_TEST_NOTNULL((__VA_ARGS__), IUTEST_ASSUME_FAILURE)
1478+# else
1479+# define IUTEST_ASSUME_NOTNULL(v) IUTEST_TEST_NOTNULL(v, IUTEST_ASSUME_FAILURE)
1480+# endif
14251481 #endif
14261482
14271483 /**
@@ -1505,7 +1561,11 @@
15051561 * @details HRESULT が成功であることを検証します
15061562 */
15071563 #ifndef IUTEST_ASSUME_HRESULT_SUCCEEDED
1508-# define IUTEST_ASSUME_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_ASSUME_FAILURE)
1564+# ifndef IUTEST_NO_VARIADIC_MACROS
1565+# define IUTEST_ASSUME_HRESULT_SUCCEEDED(...) IUTEST_TEST_HRESULT_SUCCEEDED((__VA_ARGS__), IUTEST_ASSUME_FAILURE)
1566+# else
1567+# define IUTEST_ASSUME_HRESULT_SUCCEEDED(hr) IUTEST_TEST_HRESULT_SUCCEEDED(hr, IUTEST_ASSUME_FAILURE)
1568+# endif
15091569 #endif
15101570 /**
15111571 * @ingroup IUTEST_ASSUME_
@@ -1513,7 +1573,11 @@
15131573 * @details HRESULT が失敗であることを検証します
15141574 */
15151575 #ifndef IUTEST_ASSUME_HRESULT_FAILED
1516-# define IUTEST_ASSUME_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_ASSUME_FAILURE)
1576+# ifndef IUTEST_NO_VARIADIC_MACROS
1577+# define IUTEST_ASSUME_HRESULT_FAILED(...) IUTEST_TEST_HRESULT_FAILED((__VA_ARGS__), IUTEST_ASSUME_FAILURE)
1578+# else
1579+# define IUTEST_ASSUME_HRESULT_FAILED(hr) IUTEST_TEST_HRESULT_FAILED(hr, IUTEST_ASSUME_FAILURE)
1580+# endif
15171581 #endif
15181582
15191583 #if IUTEST_HAS_EXCEPTIONS
Show on old repository browser