Added conductance
This commit is contained in:
1 parent
14f00ef775
commit
3cd77de2e9
4 files changed
+87
No files matched your search
@@ -42,6 +42,7 @@
|
||||
#include "units/physical/si/magnetic_induction.h"
|
||||
#include "units/physical/si/magnetic_flux.h"
|
||||
#include "units/physical/si/inductance.h"
|
||||
#include "units/physical/si/conductance.h"
|
||||
#include "units/format.h"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
@@ -222,6 +223,12 @@ TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]")
|
||||
CHECK(fmt::format("{}", 1q_mH) == "1 mH");
|
||||
}
|
||||
|
||||
SECTION("conductance")
|
||||
{
|
||||
CHECK(fmt::format("{}", 1q_S) == "1 S");
|
||||
CHECK(fmt::format("{}", 1q_nS) == "1 nS");
|
||||
}
|
||||
|
||||
SECTION("addition with common ratio")
|
||||
{
|
||||
CHECK(fmt::format("{}", 1q_in + 1q_yd) == "37 in");
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <units/physical/si/magnetic_induction.h>
|
||||
#include <units/physical/si/magnetic_flux.h>
|
||||
#include <units/physical/si/inductance.h>
|
||||
#include <units/physical/si/conductance.h>
|
||||
#include <utility>
|
||||
|
||||
namespace {
|
||||
@@ -225,6 +226,16 @@ static_assert(microhenry::symbol == basic_symbol_text("µH", "uH"));
|
||||
static_assert(nanohenry::symbol == "nH");
|
||||
static_assert(picohenry::symbol == "pH");
|
||||
|
||||
// conductance
|
||||
|
||||
static_assert(1q_S * 1q_R == 1);
|
||||
static_assert(1q_S == 1q_A / 1q_V);
|
||||
static_assert(1q_W == 1q_A * 1q_A / 1q_S);
|
||||
|
||||
static_assert(millisiemens::symbol == "mS");
|
||||
static_assert(microsiemens::symbol == basic_symbol_text("µS", "uS"));
|
||||
static_assert(nanosiemens::symbol == "nS");
|
||||
|
||||
/* ************** DERIVED DIMENSIONS IN TERMS OF BASE UNITS **************** */
|
||||
|
||||
// velocity
|
||||
|
||||
Reference in new issue
Block a user