[flang-commits] [flang] 66ab4b8 - [flang] Re-enable date_and_time intrinsic test (NFC) (#104967)
via flang-commits
flang-commits at lists.llvm.org
Tue Aug 20 12:47:18 PDT 2024
Author: Kelvin Li
Date: 2024-08-20T15:47:15-04:00
New Revision: 66ab4b80a4103a67a3c79b8c3b0974e301903f05
URL: https://github.com/llvm/llvm-project/commit/66ab4b80a4103a67a3c79b8c3b0974e301903f05
DIFF: https://github.com/llvm/llvm-project/commit/66ab4b80a4103a67a3c79b8c3b0974e301903f05.diff
LOG: [flang] Re-enable date_and_time intrinsic test (NFC) (#104967)
Added:
Modified:
flang/unittests/Runtime/Time.cpp
Removed:
################################################################################
diff --git a/flang/unittests/Runtime/Time.cpp b/flang/unittests/Runtime/Time.cpp
index 5c93282bca6115..9309d7b1ceffa0 100644
--- a/flang/unittests/Runtime/Time.cpp
+++ b/flang/unittests/Runtime/Time.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#ifndef __clang__ // 16.0.3 lacks <charconv>
-
#include "gtest/gtest.h"
#include "flang/Runtime/time-intrinsic.h"
#include <algorithm>
@@ -89,6 +87,7 @@ TEST(TimeIntrinsics, SystemClock) {
}
TEST(TimeIntrinsics, DateAndTime) {
+ errno = 0;
constexpr std::size_t bufferSize{16};
std::string date(bufferSize, 'Z'), time(bufferSize, 'Z'),
zone(bufferSize, 'Z');
@@ -163,4 +162,3 @@ TEST(TimeIntrinsics, DateAndTime) {
EXPECT_LE(minutes, 59);
}
}
-#endif // __clang__
More information about the flang-commits
mailing list