diff options
author | Tom Hughes <tomhughes@google.com> | 2023-02-21 18:24:42 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-02-21 18:25:39 (GMT) |
commit | 750d67d809700ae8fca6d610f7b41b71aa161808 (patch) | |
tree | 829ffd1c82c56ee3d89d56d746b73769ee443068 /googletest/include/gtest/gtest.h | |
parent | 7a7231c442484be389fdf01594310349ca0e42a8 (diff) | |
download | googletest-750d67d809700ae8fca6d610f7b41b71aa161808.zip googletest-750d67d809700ae8fca6d610f7b41b71aa161808.tar.gz googletest-750d67d809700ae8fca6d610f7b41b71aa161808.tar.bz2 |
Remove int64_t cast in RecordProperty
Historically, calls to RecordProperty with values that are convertible to
int64_t have been casted to int64_t. The result was that types like float or
double would be truncated when printed (e.g., 4.75 -> 4). This change removes
the cast so that the types are printed in a more appropriate manner.
PiperOrigin-RevId: 511238685
Change-Id: I80de5db14462da2a3e1f476086025ae514383a17
Diffstat (limited to 'googletest/include/gtest/gtest.h')
-rw-r--r-- | googletest/include/gtest/gtest.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 35c0802..6fdf552 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -302,7 +302,7 @@ class GTEST_API_ Test { template <typename T, std::enable_if_t<std::is_convertible<T, int64_t>::value, bool> = true> static void RecordProperty(const std::string& key, const T& value) { - RecordProperty(key, (Message() << static_cast<int64_t>(value)).GetString()); + RecordProperty(key, (Message() << value).GetString()); } protected: |