Split out ratio_string::symbol bodies
This commit is contained in:
parent
b083b04126
commit
baf3d2f360
3 changed files with 21 additions and 7 deletions
|
@ -12,6 +12,10 @@
|
|||
# pragma clang diagnostic ignored "-Wglobal-constructors"
|
||||
#endif
|
||||
|
||||
// Enable specific decls locally
|
||||
#if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)
|
||||
#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
|
||||
#endif
|
||||
|
||||
#include "catch_tostring.h"
|
||||
#include "catch_interfaces_config.h"
|
||||
|
@ -221,6 +225,13 @@ std::string StringMaker<double>::convert(double value) {
|
|||
return fpToString(value, 10);
|
||||
}
|
||||
|
||||
std::string ratio_string<std::atto>::symbol() { return "a"; }
|
||||
std::string ratio_string<std::femto>::symbol() { return "f"; }
|
||||
std::string ratio_string<std::pico>::symbol() { return "p"; }
|
||||
std::string ratio_string<std::nano>::symbol() { return "n"; }
|
||||
std::string ratio_string<std::micro>::symbol() { return "u"; }
|
||||
std::string ratio_string<std::milli>::symbol() { return "m"; }
|
||||
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue