From 3c97f2e6112f66575100927ddb9fe727626e949e Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 6 Jun 2024 14:07:29 +0200 Subject: [PATCH] style: clang-format --- test/static/reference_test.cpp | 44 ++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/test/static/reference_test.cpp b/test/static/reference_test.cpp index a3e26ea9c..5c040d063 100644 --- a/test/static/reference_test.cpp +++ b/test/static/reference_test.cpp @@ -189,27 +189,27 @@ static_assert( constexpr auto m_per_s = speed[metre / second]; static_assert(is_of_type<2 * m_per_s, quantity>>{}, int>>); -static_assert( - is_of_type< - 120 * length[kilometre] / (2 * time[hour]), - quantity>, derived_unit)>, per>>{}, int>>); +static_assert(is_of_type<120 * length[kilometre] / (2 * time[hour]), + quantity>, + derived_unit)>, per>>{}, + int>>); static_assert(120 * length[kilometre] / (2 * time[hour]) == 60 * speed[kilometre / hour]); -static_assert( - is_of_type< - [] { - const auto distance = 120; - const auto duration = 2; - return distance * length[kilometre] / (duration * time[hour]); - }(), - quantity>, derived_unit)>, per>>{}, int>>); -static_assert( - is_of_type>, derived_unit)>, per>>{}, - std::int64_t>>); -static_assert( - is_of_type<120.L * length[kilometre] / (2 * time[hour]), - quantity>, derived_unit)>, per>>{}, - long double>>); +static_assert(is_of_type<[] { + const auto distance = 120; + const auto duration = 2; + return distance * length[kilometre] / (duration * time[hour]); +}(), + quantity>, + derived_unit)>, per>>{}, + int>>); +static_assert(is_of_type>, + derived_unit)>, per>>{}, + std::int64_t>>); +static_assert(is_of_type<120.L * length[kilometre] / (2 * time[hour]), + quantity>, + derived_unit)>, per>>{}, + long double>>); static_assert(is_of_type<1. / 4 * area[square(metre)], decltype(1. * area[square(metre)] / 4)>); static_assert(1. / 4 * area[square(metre)] == 1. * area[square(metre)] / 4); @@ -226,7 +226,9 @@ static_assert(is_of_type<42 * nu::length[nu::second] / (42 * nu::time[nu::second static_assert(is_of_type<42 * nu::speed[nu::second / nu::second], quantity{}, int>>); static_assert(is_of_type<42 * nu::speed[one], quantity{}, int>>); static_assert(is_of_type<42 * mass[kilogram] * (1 * nu::length[nu::second]) / (1 * nu::time[nu::second]), - quantity>, std::remove_const_t)>>{}, int>>); + quantity>, + std::remove_const_t)>>{}, + int>>); template concept invalid_nu_unit = !requires { dim[unit]; };