Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Jul 5, 2019
2 parents 7bc1fce + c6960d6 commit 5bbcaf0
Show file tree
Hide file tree
Showing 31 changed files with 674 additions and 307 deletions.
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

## Changes for 1.17.0

* Improved
* New
* ALMOST_EQ アサーション を追加
* --iutest_locale_ctype オプションを追加

* Improved
* setlocale(LC_CTYPE, IUTEST_FLAG(locale_ctype)) をテスト実行開始時に行うように修正
* Visual Studio 2019 対応

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![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)
[![CircleCI](https://circleci.com/gh/srz-zumix/iutest/tree/master.svg?style=svg)](https://circleci.com/gh/srz-zumix/iutest/tree/master)
[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=master)](https://cirrus-ci.com/github/srz-zumix/iutest/master)
[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_benchmark_test?branch=master&type=cf-2)]( https://g.codefresh.io/pipelines/iutest_benchmark_test/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_benchmark_test)
[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_unittest?branch=master&type=cf-2)]( https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_unittest)
[![Codeship Status for srz-zumix/iutest](https://codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://codeship.com/projects/110695)
[![Drone Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=master)](https://cloud.drone.io/srz-zumix/iutest)
[![Git Hub Actions Status](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/badge/srz-zumix/iutest)](https://github.com/srz-zumix/iutest/actions)
Expand All @@ -19,6 +19,7 @@
[![Codecov](https://codecov.io/gh/srz-zumix/iutest/branch/master/graph/badge.svg)](https://codecov.io/gh/srz-zumix/iutest)
[![Coveralls Coverage Status](https://coveralls.io/repos/github/srz-zumix/iutest/badge.svg?branch=master)](https://coveralls.io/github/srz-zumix/iutest?branch=master)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/1316/badge.svg)](https://scan.coverity.com/projects/srz-zumix-iutest)
[![GuardRails badge](https://badges.guardrails.io/srz-zumix/iutest.svg?token=fe1bb5ca5f743800d26e4d2b7282c5b316df83c0b228048f4192510bdd7280f0)](https://dashboard.guardrails.io/default/gh/srz-zumix/iutest)
[![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)
[![Rocro INSPECODE Report](https://inspecode.rocro.com/badges/github.com/srz-zumix/iutest/report?token=wt0KUnRUG1-Ul2mLrg8ComR1RznZV3VoXecBJHW0EIk&branch=master)](https://inspecode.rocro.com/reports/github.com/srz-zumix/iutest/branch/master/summary)
[![New(3-clause) BSD License](https://img.shields.io/badge/license-New_BSD-blue.svg)](http://opensource.org/licenses/BSD-3-Clause)
Expand Down Expand Up @@ -116,7 +117,7 @@ Tests
|[Circle CI](https://circleci.com/)|[![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|
|[Cirrus CI](https://cirrus-ci.org/)|[![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...|
|[Codacy](https://www.codacy.com/)|[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6407b63c9c844d080ed71c7707bded9?branch=master)](https://www.codacy.com/app/srz-zumix/iutest?utm_source=github.com&utm_medium=referral&utm_content=srz-zumix/iutest&utm_campaign=Badge_Grade)|[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6407b63c9c844d080ed71c7707bded9?branch=develop)](https://www.codacy.com/app/srz-zumix/iutest?utm_source=github.com&utm_medium=referral&utm_content=srz-zumix/iutest&utm_campaign=Badge_Grade)|Shellcheck, Cppcheck, PyLint, etc...|
|[Codefresh](https://codefresh.io/)|[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_benchmark_test?branch=master&type=cf-2)]( https://g.codefresh.io/pipelines/iutest_benchmark_test/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_benchmark_test)|[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_benchmark_test?branch=develop&type=cf-2)]( https://g.codefresh.io/pipelines/iutest_benchmark_test/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:develop;pipeline:58a933be9d1bd40100495882~iutest_benchmark_test)|Benchmark test|
|[Codefresh](https://codefresh.io/)|[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_unittest?branch=master&type=cf-1)]( https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_unittest)|[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_unittest?branch=develop&type=cf-1)]( https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:develop;pipeline:58a933be9d1bd40100495882~iutest_unittest)|Benchmark test, Gcc 7/8/9 basic test|
|[Codeship](https://codeship.com/)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://app.codeship.com/projects/110695)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=develop)](https://app.codeship.com/projects/110695)|Update documents, Check coding standard of the project|
|[Coverity Scan](https://scan.coverity.com)|[![Coverity Scan Build Status](https://scan.coverity.com/projects/1316/badge.svg)](https://scan.coverity.com/projects/srz-zumix-iutest)||Coverity Scan|
|[Drone Cloud](https://cloud.drone.io)|[![Drone Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=master)](https://cloud.drone.io/srz-zumix/iutest)|[![Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=develop)](https://cloud.drone.io/srz-zumix/iutest)|gtest compatible test for released versions / gtest version detect test|
Expand Down
67 changes: 52 additions & 15 deletions codefresh.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,64 @@
version: '1.0'
stages:
- checkout
- build
- test

steps:
main_clone:
title: Cloning main repository...
type: git-clone
stage: checkout
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
BuildingDockerImage:
title: Building Docker Image
stage: build
type: build
image_name: srz-zumix/iutest
working_directory: ./
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
dockerfile: tools/docker/Dockerfile
dockerfile: ./tools/docker/Dockerfile
RunningUnitTests:
title: Running Unit Tests
image: '${{BuildingDockerImage}}'
working_directory: IMAGE_WORK_DIR
entry_point:
- /bin/sh
- /codefresh/volume/cf-generated/unit_test_script
create_file:
path: /codefresh/volume/cf-generated
name: unit_test_script
content: |-
cd /codefresh/volume/iutest
cd test
make -C benchmark
make bench
type: parallel
stage: test
steps:
BasicTest-gcc9: &basic_test
title: Running Basic Tests - gcc9
image: gcc:9
environment:
- OUTDIR=gcc9
commands:
- mkdir test/${OUTDIR} || true
- make -C test clean
- make -C test test
BasicTest-gcc8:
<<: *basic_test
title: Running Basic Tests - gcc8
image: gcc:8
environment:
- OUTDIR=gcc8
BasicTest-gcc7:
<<: *basic_test
title: Running Basic Tests - gcc7
image: gcc:7
environment:
- OUTDIR=gcc7
BenchmarkTest:
title: Running Benchmark Tests
image: '${{BuildingDockerImage}}'
working_directory: IMAGE_WORK_DIR
entry_point:
- /bin/sh
- /codefresh/volume/cf-generated/unit_test_script
create_file:
path: /codefresh/volume/cf-generated
name: unit_test_script
content: |-
cd /codefresh/volume/iutest
cd test
make -C benchmark
make bench
on_success:
metadata:
set:
Expand Down
2 changes: 1 addition & 1 deletion docs/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.16.99.20
PROJECT_NUMBER = 1.16.99.22

# 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
3 changes: 2 additions & 1 deletion docs/primer.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ <h3><a name="diff_compat" id="diff_compat">iutest 拡張機能</a></h3>
<ul>
<li><a name="ext_assert_ex" id="ext_assert_ex">アサーションの拡張</a><br />
<ul>
<li>IUTEST_ASSERT_ALMOST_EQ</li>
<li>IUTEST_ASSERT_EQ_RANGE</li>
<li>IUTEST_ASSERT_EQ_COLLECTIONS</li>
<li>IUTEST_ASSERT_STRLNEQ</li>
Expand Down Expand Up @@ -705,7 +706,7 @@ <h3><a name="matcher_matchers" id="matcher_matchers">Matcher の種類</a></h3>
</div> <!-- end of contents -->

<br />
<div class="copyright">Copyright (c) 2011-2017, Takazumi-Shirayanagi, All rights reserved.</div>
<div class="copyright">Copyright (c) 2011-2019, Takazumi-Shirayanagi, All rights reserved.</div>

</body>
</html>
28 changes: 16 additions & 12 deletions include/gtest/switch/iutest_switch_assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@

//======================================================================
// define
#define ASSERT_TRUE IUTEST_ASSERT_TRUE
#define ASSERT_FALSE IUTEST_ASSERT_FALSE
#define ASSERT_EQ IUTEST_ASSERT_EQ
#define ASSERT_NE IUTEST_ASSERT_NE
#define ASSERT_LT IUTEST_ASSERT_LT
#define ASSERT_LE IUTEST_ASSERT_LE
#define ASSERT_GT IUTEST_ASSERT_GT
#define ASSERT_GE IUTEST_ASSERT_GE
#define ASSERT_NEAR IUTEST_ASSERT_NEAR
#define ASSERT_TRUE IUTEST_ASSERT_TRUE
#define ASSERT_FALSE IUTEST_ASSERT_FALSE
#define ASSERT_EQ IUTEST_ASSERT_EQ
#define ASSERT_NE IUTEST_ASSERT_NE
#define ASSERT_LT IUTEST_ASSERT_LT
#define ASSERT_LE IUTEST_ASSERT_LE
#define ASSERT_GT IUTEST_ASSERT_GT
#define ASSERT_GE IUTEST_ASSERT_GE
#define ASSERT_NEAR IUTEST_ASSERT_NEAR
#define ASSERT_FLOAT_EQ IUTEST_ASSERT_FLOAT_EQ
#define ASSERT_DOUBLE_EQ IUTEST_ASSERT_DOUBLE_EQ
#define ASSERT_STREQ IUTEST_ASSERT_STREQ
Expand Down Expand Up @@ -113,6 +113,7 @@
#undef IUTEST_ASSERT_TRUE
#undef IUTEST_ASSERT_FALSE
#undef IUTEST_ASSERT_EQ
#undef IUTEST_ASSERT_ALMOST_EQ
#undef IUTEST_ASSERT_NE
#undef IUTEST_ASSERT_LT
#undef IUTEST_ASSERT_LE
Expand Down Expand Up @@ -161,6 +162,8 @@
#define IUTEST_ASSERT_TRUE(...) ASSERT_TRUE(!!(__VA_ARGS__))
#define IUTEST_ASSERT_FALSE(...) ASSERT_FALSE((__VA_ARGS__))
#define IUTEST_ASSERT_EQ ASSERT_EQ
#define IUTEST_ASSERT_ALMOST_EQ(expected, actual) \
ASSERT_PRED_FORMAT2( ::testing::internal::backward::AlmostEqHelper<IUTEST_IS_NULLLITERAL(expected)>::Compare, expected, actual)
#define IUTEST_ASSERT_NE(expected, actual) ASSERT_PRED_FORMAT2(IIUT_COMPATIBLE_NEHELPER(expected)::Compare, expected, actual)
#define IUTEST_ASSERT_LT ASSERT_LT
#define IUTEST_ASSERT_LE ASSERT_LE
Expand Down Expand Up @@ -206,8 +209,9 @@

#endif // !defined(IUTEST_USE_GTEST)

#define ASSERT_NULL IUTEST_ASSERT_NULL
#define ASSERT_NOTNULL IUTEST_ASSERT_NOTNULL
#define ASSERT_SAME IUTEST_ASSERT_SAME
#define ASSERT_ALMOST_EQ IUTEST_ASSERT_ALMOST_EQ
#define ASSERT_NULL IUTEST_ASSERT_NULL
#define ASSERT_NOTNULL IUTEST_ASSERT_NOTNULL
#define ASSERT_SAME IUTEST_ASSERT_SAME

#endif // INCG_IRIS_IUTEST_SWITCH_ASSERT_HPP_F4AD6E1B_4B1F_40EE_A0CC_D454587B2C39_
28 changes: 16 additions & 12 deletions include/gtest/switch/iutest_switch_assume.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

//======================================================================
// define
#define ASSUME_TRUE IUTEST_ASSUME_TRUE
#define ASSUME_FALSE IUTEST_ASSUME_FALSE
#define ASSUME_EQ IUTEST_ASSUME_EQ
#define ASSUME_NE IUTEST_ASSUME_NE
#define ASSUME_LT IUTEST_ASSUME_LT
#define ASSUME_LE IUTEST_ASSUME_LE
#define ASSUME_GT IUTEST_ASSUME_GT
#define ASSUME_GE IUTEST_ASSUME_GE
#define ASSUME_NEAR IUTEST_ASSUME_NEAR
#define ASSUME_TRUE IUTEST_ASSUME_TRUE
#define ASSUME_FALSE IUTEST_ASSUME_FALSE
#define ASSUME_EQ IUTEST_ASSUME_EQ
#define ASSUME_NE IUTEST_ASSUME_NE
#define ASSUME_LT IUTEST_ASSUME_LT
#define ASSUME_LE IUTEST_ASSUME_LE
#define ASSUME_GT IUTEST_ASSUME_GT
#define ASSUME_GE IUTEST_ASSUME_GE
#define ASSUME_NEAR IUTEST_ASSUME_NEAR
#define ASSUME_FLOAT_EQ IUTEST_ASSUME_FLOAT_EQ
#define ASSUME_DOUBLE_EQ IUTEST_ASSUME_DOUBLE_EQ
#define ASSUME_STREQ IUTEST_ASSUME_STREQ
Expand Down Expand Up @@ -72,6 +72,7 @@
#undef IUTEST_ASSUME_TRUE
#undef IUTEST_ASSUME_FALSE
#undef IUTEST_ASSUME_EQ
#undef IUTEST_ASSUME_ALMOST_EQ
#undef IUTEST_ASSUME_NE
#undef IUTEST_ASSUME_LT
#undef IUTEST_ASSUME_LE
Expand Down Expand Up @@ -193,6 +194,8 @@
#define IUTEST_ASSUME_TRUE(...) ASSUME_TRUE(!!(__VA_ARGS__))
#define IUTEST_ASSUME_FALSE(...) ASSUME_FALSE((__VA_ARGS__))
#define IUTEST_ASSUME_EQ ASSUME_EQ
#define IUTEST_ASSUME_ALMOST_EQ(expected, actual) \
ASSUME_PRED_FORMAT2( ::testing::internal::backward::AlmostEqHelper<IUTEST_IS_NULLLITERAL(expected)>::Compare, expected, actual)
#define IUTEST_ASSUME_NE(expected, actual) ASSUME_PRED_FORMAT2(IIUT_COMPATIBLE_NEHELPER(expected)::Compare, expected, actual)
#define IUTEST_ASSUME_LT ASSUME_LT
#define IUTEST_ASSUME_LE ASSUME_LE
Expand Down Expand Up @@ -239,8 +242,9 @@

#endif // !defined(IUTEST_USE_GTEST)

#define ASSUME_NULL IUTEST_ASSUME_NULL
#define ASSUME_NOTNULL IUTEST_ASSUME_NOTNULL
#define ASSUME_SAME IUTEST_ASSUME_SAME
#define ASSUME_ALMOST_EQ IUTEST_ASSUME_ALMOST_EQ
#define ASSUME_NULL IUTEST_ASSUME_NULL
#define ASSUME_NOTNULL IUTEST_ASSUME_NOTNULL
#define ASSUME_SAME IUTEST_ASSUME_SAME

#endif // INCG_IRIS_IUTEST_SWITCH_ASSUME_HPP_E22A3162_D581_4F4F_A344_F5D701B21F53_
40 changes: 33 additions & 7 deletions include/gtest/switch/iutest_switch_cmphelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ namespace backward

#if defined(GTEST_IS_NULL_LITERAL_)

template <bool lhs_is_null_literal>
template<bool lhs_is_null_literal>
class EqHelper : public internal::EqHelper<lhs_is_null_literal> {};

#else

template <bool lhs_is_null_literal>
template<bool lhs_is_null_literal>
class EqHelper : public internal::EqHelper {};

#endif

template <bool lhs_is_null_literal>
template<bool lhs_is_null_literal>
class NeHelper {
public:
template <typename T1, typename T2>
template<typename T1, typename T2>
static AssertionResult Compare(const char* expected_expression,
const char* actual_expression,
const T1& expected,
Expand All @@ -76,10 +76,10 @@ class NeHelper {
}
};

template <>
template<>
class NeHelper<true> {
public:
template <typename T1, typename T2>
template<typename T1, typename T2>
static AssertionResult Compare(
const char* expected_expression,
const char* actual_expression,
Expand All @@ -90,7 +90,7 @@ class NeHelper<true> {
actual);
}

template <typename T>
template<typename T>
static AssertionResult Compare(
const char* expected_expression,
const char* actual_expression,
Expand All @@ -101,6 +101,32 @@ class NeHelper<true> {
}
};

template<bool lhs_is_null_literal>
class AlmostEqHelper : public EqHelper<lhs_is_null_literal>
{
public:
template<typename T1, typename T2>
static AssertionResult Compare(const char* expr1, const char* expr2, const T1& val1, const T2& val2)
{
return EqHelper<false>::Compare(expr1, expr2, val1, static_cast<T1>(val2));
}
template<typename T>
static AssertionResult Compare(const char* expr1, const char* expr2, const float& val1, const T& val2)
{
return CmpHelperFloatingPointEQ<float>(expr1, expr2, val1, static_cast<float>(val2));
}
template<typename T>
static AssertionResult Compare(const char* expr1, const char* expr2, const double& val1, const T& val2)
{
return CmpHelperFloatingPointEQ<double>(expr1, expr2, val1, static_cast<double>(val2));
}
};

template<>
class AlmostEqHelper<true> : public EqHelper<true>
{
};

} // end of namespace backward

//======================================================================
Expand Down
28 changes: 16 additions & 12 deletions include/gtest/switch/iutest_switch_expect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@

//======================================================================
// define
#define EXPECT_TRUE IUTEST_EXPECT_TRUE
#define EXPECT_FALSE IUTEST_EXPECT_FALSE
#define EXPECT_EQ IUTEST_EXPECT_EQ
#define EXPECT_NE IUTEST_EXPECT_NE
#define EXPECT_LT IUTEST_EXPECT_LT
#define EXPECT_LE IUTEST_EXPECT_LE
#define EXPECT_GT IUTEST_EXPECT_GT
#define EXPECT_GE IUTEST_EXPECT_GE
#define EXPECT_NEAR IUTEST_EXPECT_NEAR
#define EXPECT_TRUE IUTEST_EXPECT_TRUE
#define EXPECT_FALSE IUTEST_EXPECT_FALSE
#define EXPECT_EQ IUTEST_EXPECT_EQ
#define EXPECT_NE IUTEST_EXPECT_NE
#define EXPECT_LT IUTEST_EXPECT_LT
#define EXPECT_LE IUTEST_EXPECT_LE
#define EXPECT_GT IUTEST_EXPECT_GT
#define EXPECT_GE IUTEST_EXPECT_GE
#define EXPECT_NEAR IUTEST_EXPECT_NEAR
#define EXPECT_FLOAT_EQ IUTEST_EXPECT_FLOAT_EQ
#define EXPECT_DOUBLE_EQ IUTEST_EXPECT_DOUBLE_EQ
#define EXPECT_STREQ IUTEST_EXPECT_STREQ
Expand Down Expand Up @@ -113,6 +113,7 @@
#undef IUTEST_EXPECT_TRUE
#undef IUTEST_EXPECT_FALSE
#undef IUTEST_EXPECT_EQ
#undef IUTEST_EXPECT_ALMOST_EQ
#undef IUTEST_EXPECT_NE
#undef IUTEST_EXPECT_LT
#undef IUTEST_EXPECT_LE
Expand Down Expand Up @@ -162,6 +163,8 @@
#define IUTEST_EXPECT_TRUE(...) EXPECT_TRUE(!!(__VA_ARGS__))
#define IUTEST_EXPECT_FALSE(...) EXPECT_FALSE((__VA_ARGS__))
#define IUTEST_EXPECT_EQ EXPECT_EQ
#define IUTEST_EXPECT_ALMOST_EQ(expected, actual) \
EXPECT_PRED_FORMAT2( ::testing::internal::backward::AlmostEqHelper<IUTEST_IS_NULLLITERAL(expected)>::Compare, expected, actual)
#define IUTEST_EXPECT_NE(expected, actual) EXPECT_PRED_FORMAT2(IIUT_COMPATIBLE_NEHELPER(expected)::Compare, expected, actual)
#define IUTEST_EXPECT_LT EXPECT_LT
#define IUTEST_EXPECT_LE EXPECT_LE
Expand Down Expand Up @@ -206,8 +209,9 @@

#endif // !defined(IUTEST_USE_GTEST)

#define EXPECT_NULL IUTEST_EXPECT_NULL
#define EXPECT_NOTNULL IUTEST_EXPECT_NOTNULL
#define EXPECT_SAME IUTEST_EXPECT_SAME
#define EXPECT_ALMOST_EQ IUTEST_EXPECT_ALMOST_EQ
#define EXPECT_NULL IUTEST_EXPECT_NULL
#define EXPECT_NOTNULL IUTEST_EXPECT_NOTNULL
#define EXPECT_SAME IUTEST_EXPECT_SAME

#endif // INCG_IRIS_IUTEST_SWITCH_EXPECT_HPP_F4AD6E1B_4B1F_40EE_A0CC_D454587B2C39_
Loading

0 comments on commit 5bbcaf0

Please sign in to comment.