Skip to content

Commit

Permalink
fix: common_type_t unit tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Jul 14, 2024
1 parent fcc16ae commit d84a2be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/static/quantity_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,18 +984,18 @@ static_assert(is_same_v<std::common_type_t<quantity<(isq::mass * pow<2>(isq::len
quantity<isq::energy[J], double>>);

#if MP_UNITS_HOSTED
static_assert(is_same_v<std::common_type_t<quantity<si::second, int>, std::chrono::seconds>, std::chrono::seconds>);
static_assert(is_same_v<std::common_type_t<quantity<si::second, std::chrono::seconds::rep>, std::chrono::seconds>, std::chrono::seconds>);
#endif

static_assert(is_same_v<std::common_type_t<quantity<one, int>, int>, quantity<one, int>>);
// static_assert(is_same_v<std::common_type_t<quantity<one, int>, double>, quantity<one, double>>);
// static_assert(is_same_v<std::common_type_t<quantity<one, double>, int>, quantity<one, double>>);
static_assert(is_same_v<std::common_type_t<quantity<one, int>, double>, quantity<one, double>>);
static_assert(is_same_v<std::common_type_t<quantity<one, double>, int>, quantity<one, double>>);
static_assert(is_same_v<std::common_type_t<quantity<isq::angular_measure[one], int>, int>,
quantity<isq::angular_measure[one], int>>);
// static_assert(is_same_v<std::common_type_t<quantity<isq::angular_measure[one], int>, double>,
// quantity<isq::angular_measure[one], double>>);
// static_assert(is_same_v<std::common_type_t<quantity<isq::angular_measure[one], double>, int>,
// quantity<isq::angular_measure[one], double>>);
static_assert(is_same_v<std::common_type_t<quantity<isq::angular_measure[one], int>, double>,
quantity<isq::angular_measure[one], double>>);
static_assert(is_same_v<std::common_type_t<quantity<isq::angular_measure[one], double>, int>,
quantity<isq::angular_measure[one], double>>);


//////////////////
Expand Down

0 comments on commit d84a2be

Please sign in to comment.