forked from mpusz/mp-units
style: clang-format new rules applied to the code base
This commit is contained in:
@@ -31,8 +31,8 @@ struct AlmostEqualsMatcher : Catch::Matchers::MatcherGenericBase {
|
||||
AlmostEqualsMatcher(const T& target) : target_{target} {}
|
||||
|
||||
template<std::convertible_to<T> U>
|
||||
requires std::same_as<typename T::rep, typename U::rep> && treat_as_floating_point<typename T::rep> bool
|
||||
match(const U& other) const
|
||||
requires std::same_as<typename T::rep, typename U::rep> && treat_as_floating_point<typename T::rep>
|
||||
bool match(const U& other) const
|
||||
{
|
||||
using std::abs;
|
||||
using common = std::common_type_t<T, U>;
|
||||
|
||||
@@ -722,8 +722,8 @@ TEST_CASE("localization with the 'L' specifier", "[text][fmt][localization]")
|
||||
|
||||
SECTION("full format {:%LQ %q} on a quantity")
|
||||
{
|
||||
CHECK(UNITS_STD_FMT::format(grp2, "{:%LQ %q}", 299792458 * isq::speed[m / s]) == "2_99_79_24_58 m/s");
|
||||
CHECK(UNITS_STD_FMT::format(grp3, "{:%LQ %q}", 299792458 * isq::speed[m / s]) == "299'792'458 m/s");
|
||||
CHECK(UNITS_STD_FMT::format(grp2, "{:%LQ %q}", 299'792'458 * isq::speed[m / s]) == "2_99_79_24_58 m/s");
|
||||
CHECK(UNITS_STD_FMT::format(grp3, "{:%LQ %q}", 299'792'458 * isq::speed[m / s]) == "299'792'458 m/s");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user