From 04bde89e5cb33bf4a714a5496fac715481fc4831 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 3 Mar 2022 20:39:13 -0800 Subject: Export of internal Abseil changes -- 3358c3cca1c3770fb5d50e743ac56547af813561 by Dino Radakovic : Add ABSL_SKIP_TIME_TESTS_BROKEN_ON_MSVC_OPT guard to TEST(Duration, Multiplication) PiperOrigin-RevId: 432350431 Change-Id: I28a26a12665e3e9a9ebdf50d0249eafa8336c585 -- af631611681a298c305578d5049757ec8ced03ab by Dino Radakovic : Add config macro for optional skipping absl/time:time_test cases that fail on MSVC optimized builds PiperOrigin-RevId: 432252533 Change-Id: Ic3879ccdd8e30945a1a2e980e9ae246bcef8d7bd GitOrigin-RevId: 3358c3cca1c3770fb5d50e743ac56547af813561 --- absl/time/time_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'absl/time/time_test.cc') diff --git a/absl/time/time_test.cc b/absl/time/time_test.cc index cde9423f..d235e9ad 100644 --- a/absl/time/time_test.cc +++ b/absl/time/time_test.cc @@ -377,6 +377,11 @@ TEST(Time, FloorConversion) { } TEST(Time, RoundtripConversion) { +#if defined(ABSL_SKIP_TIME_TESTS_BROKEN_ON_MSVC_OPT) && \ + ABSL_SKIP_TIME_TESTS_BROKEN_ON_MSVC_OPT + GTEST_SKIP(); +#endif + #define TEST_CONVERSION_ROUND_TRIP(SOURCE, FROM, TO, MATCHER) \ EXPECT_THAT(TO(FROM(SOURCE)), MATCHER(SOURCE)) @@ -558,6 +563,11 @@ TEST(Time, FromChrono) { } TEST(Time, ToChronoTime) { +#if defined(ABSL_SKIP_TIME_TESTS_BROKEN_ON_MSVC_OPT) && \ + ABSL_SKIP_TIME_TESTS_BROKEN_ON_MSVC_OPT + GTEST_SKIP(); +#endif + EXPECT_EQ(std::chrono::system_clock::from_time_t(-1), absl::ToChronoTime(absl::FromTimeT(-1))); EXPECT_EQ(std::chrono::system_clock::from_time_t(0), -- cgit v1.2.3