You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Pass double value into RecordProperty, get compiler warning
Warning: passing `double' for converting 2 of `static void
testing::Test::RecordProperty(const
char*, int)'
due to no double option
2. RecordProperty seems to currently support int/char*
./gtest/gtest.h: static void RecordProperty(const char* key, const char*
value);
./gtest/gtest.h: static void RecordProperty(const char* key, int value)
What is the expected output? What do you see instead?
Would be cool to have versions of the method for different types, so wouldnt
have to convert
double to char* outside the method, in order to see the result in the XML file.
Other types could
be supported too.
What version of the product are you using? On what operating system?
Linux, gtest 1.3.0
Original issue reported on code.google.com by [email protected] on 18 Sep 2009 at 10:09
The text was updated successfully, but these errors were encountered:
Probably we should templatize it:
template <typename T>
void RecordProperty(const char* name, const T& value);
The implementation will just stream value to a stringstream and then extract
the string.
This allows any printable type to be used in RecordProperty.
Original issue reported on code.google.com by
[email protected]
on 18 Sep 2009 at 10:09The text was updated successfully, but these errors were encountered: