fix for VS2017 deprecation of ::tr1::tuple

change static_cast to ImplicitCast_ for consitency
fixes for building with path names containing spaces
This commit is contained in:
Bryan Zimmerman
2017-10-27 14:01:16 -04:00
parent 3121b2049e
commit 1ae4096b9c
6 changed files with 31 additions and 22 deletions

View File

@@ -64,6 +64,7 @@ using testing::ElementsAreArray;
using testing::Eq;
using testing::Ge;
using testing::Gt;
using testing::internal::ImplicitCast_;
using testing::Le;
using testing::Lt;
using testing::MakeMatcher;
@@ -120,7 +121,7 @@ TEST(ArgsTest, AcceptsOneTemplateArg) {
}
TEST(ArgsTest, AcceptsTwoTemplateArgs) {
const tuple<short, int, long> t(static_cast<short>(4), 5, 6L); // NOLINT
const tuple<short, int, long> t(ImplicitCast_<short>(4), 5, 6L); // NOLINT
EXPECT_THAT(t, (Args<0, 1>(Lt())));
EXPECT_THAT(t, (Args<1, 2>(Lt())));
@@ -128,13 +129,13 @@ TEST(ArgsTest, AcceptsTwoTemplateArgs) {
}
TEST(ArgsTest, AcceptsRepeatedTemplateArgs) {
const tuple<short, int, long> t(static_cast<short>(4), 5, 6L); // NOLINT
const tuple<short, int, long> t(ImplicitCast_<short>(4), 5, 6L); // NOLINT
EXPECT_THAT(t, (Args<0, 0>(Eq())));
EXPECT_THAT(t, Not(Args<1, 1>(Ne())));
}
TEST(ArgsTest, AcceptsDecreasingTemplateArgs) {
const tuple<short, int, long> t(static_cast<short>(4), 5, 6L); // NOLINT
const tuple<short, int, long> t(ImplicitCast_<short>(4), 5, 6L); // NOLINT
EXPECT_THAT(t, (Args<2, 0>(Gt())));
EXPECT_THAT(t, Not(Args<2, 1>(Lt())));
}
@@ -159,7 +160,7 @@ TEST(ArgsTest, AcceptsMoreTemplateArgsThanArityOfOriginalTuple) {
}
TEST(ArgsTest, CanBeNested) {
const tuple<short, int, long, int> t(static_cast<short>(4), 5, 6L, 6); // NOLINT
const tuple<short, int, long, int> t(ImplicitCast_<short>(4), 5, 6L, 6); // NOLINT
EXPECT_THAT(t, (Args<1, 2, 3>(Args<1, 2>(Eq()))));
EXPECT_THAT(t, (Args<0, 1, 3>(Args<0, 2>(Lt()))));
}