mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-17 02:25:38 +02:00
Add support for custom precision in floating point stringification
Closes #1612
This commit is contained in:

committed by
Martin Hořeňovský

parent
9c741fe960
commit
53a83e855e
@@ -261,10 +261,19 @@ namespace Catch {
|
||||
template<>
|
||||
struct StringMaker<float> {
|
||||
static std::string convert(float value);
|
||||
static void setPrecision(int precision);
|
||||
static int getPrecision();
|
||||
private:
|
||||
static int m_precision;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct StringMaker<double> {
|
||||
static std::string convert(double value);
|
||||
static void setPrecision(int precision);
|
||||
static int getPrecision();
|
||||
private:
|
||||
static int m_precision;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
Reference in New Issue
Block a user