Added molar energy

This commit is contained in:
rbrugo authored and Mateusz Pusz committed 2020-04-10 16:36:08 +02:00
1 parent 89dbc30a92
commit 7dda8319a2
5 files changed
+66

No files matched your search

@@ -297,6 +297,11 @@ TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]")
CHECK(fmt::format("{}", 1q_H_per_m) == "1 H/m");
}
SECTION("molar energy")
{
CHECK(fmt::format("{}", 1q_J_per_mol) == "1 J/mol");
}
SECTION("incoherent units with powers")
{
CHECK(fmt::format("{}", 1q_mi * 1q_mi * 1q_mi) == "1 [15900351812136/3814697265625 × 10⁹] m³");
+6
View File
@@ -361,4 +361,10 @@ static_assert(1q_H_per_m * 1q_A * 1q_A == 1q_N);
static_assert(detail::unit_text<dim_permeability, henry_per_metre>() == "H/m");
// molar energy
static_assert(1q_J_per_mol * 1q_mol_per_m3 * 1q_m3 == 1q_N * 1q_m);
static_assert(detail::unit_text<dim_molar_energy, joule_per_mole>() == "J/mol");
} // namespace