From 7c39aa10f419dd32e559c3a4e76b3b26a5113f54 Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu> Date: Fri, 25 Nov 2022 17:57:05 +0100 Subject: [PATCH] test new SI prefixes --- corsika/framework/units/quantity_io.hpp | 2 +- tests/framework/testUnits.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/corsika/framework/units/quantity_io.hpp b/corsika/framework/units/quantity_io.hpp index 8d38c9b13..2bed08295 100644 --- a/corsika/framework/units/quantity_io.hpp +++ b/corsika/framework/units/quantity_io.hpp @@ -82,7 +82,7 @@ inline Rep prefix( std::string const prefix_ ) { "d", deci }, { "c", centi }, { "r", ronto }, - { "q", quocto }, + { "q", quecto }, { "R", ronna }, { "Q", quetta }, }; diff --git a/tests/framework/testUnits.cpp b/tests/framework/testUnits.cpp index 5c90aa9cd..2938f4bb6 100644 --- a/tests/framework/testUnits.cpp +++ b/tests/framework/testUnits.cpp @@ -57,6 +57,8 @@ TEST_CASE("PhysicalUnits", "[Units]") { CHECK(1_mol / 1_amol == Approx(1e18)); CHECK(1_K / 1_zK == Approx(1e21)); CHECK(1_K / 1_yK == Approx(1e24)); + CHECK(1_V / 1_rV == Approx(1e27)); + CHECK(1_V / 1_qV == Approx(1e30)); CHECK(1_b / 1_mb == Approx(1e3)); CHECK(1_A / 1_hA == Approx(1e-2)); @@ -68,6 +70,8 @@ TEST_CASE("PhysicalUnits", "[Units]") { CHECK(1_A / 1_EA == Approx(1e-18)); CHECK(1_K / 1_ZK == Approx(1e-21)); CHECK(1_mol / 1_Ymol == Approx(1e-24)); + CHECK(1_V / 1_RV == Approx(1e-27)); + CHECK(1_V / 1_QV == Approx(1e-30)); CHECK(std::min(1_A, 2_A) == 1_A); } -- GitLab