[poincare/unit] Symbols for cup and tablespoon

_cp   -> _cup
_Tbsp -> _tbsp

Change-Id: Ied3e1624edc980f76c2f775cbb9e6028db8a83c5
This commit is contained in:
Gabriel Ozouf
2020-08-12 16:40:34 +02:00
committed by Émilie Feral
parent 52dcd8e749
commit 5e06f62ff6
3 changed files with 8 additions and 8 deletions

View File

@@ -84,9 +84,9 @@ UnitVolumeLiterDeciSymbol = "_dL"
UnitVolumeLiterCentiSymbol = "_cL"
UnitVolumeLiterMilliSymbol = "_mL"
UnitVolumeTeaspoonSymbol = "_tsp"
UnitVolumeTablespoonSymbol = "_Tbsp"
UnitVolumeTablespoonSymbol = "_tbsp"
UnitVolumeFluidOunceSymbol = "_floz"
UnitVolumeCupSymbol = "_cp"
UnitVolumeCupSymbol = "_cup"
UnitVolumePintSymbol = "_pt"
UnitVolumeQuartSymbol = "_qt"
UnitVolumeGallonSymbol = "_gal"

View File

@@ -586,9 +586,9 @@ public:
static constexpr const VolumeRepresentative k_volumeRepresentatives[] = {
VolumeRepresentative("L", 0.001, Prefixable::All, Prefixable::Negative),
VolumeRepresentative("tsp", 0.00000492892159375, Prefixable::None, Prefixable::None),
VolumeRepresentative("Tbsp", 3*0.00000492892159375, Prefixable::None, Prefixable::None),
VolumeRepresentative("tbsp", 3*0.00000492892159375, Prefixable::None, Prefixable::None),
VolumeRepresentative("floz", 0.0000295735295625, Prefixable::None, Prefixable::None),
VolumeRepresentative("cp", 8*0.0000295735295625, Prefixable::None, Prefixable::None),
VolumeRepresentative("cup", 8*0.0000295735295625, Prefixable::None, Prefixable::None),
VolumeRepresentative("pt", 16*0.0000295735295625, Prefixable::None, Prefixable::None),
VolumeRepresentative("qt", 32*0.0000295735295625, Prefixable::None, Prefixable::None),
VolumeRepresentative("gal", 128*0.0000295735295625, Prefixable::None, Prefixable::None),
@@ -642,7 +642,7 @@ public:
static constexpr int k_fluidOunceRepresentativeIndex = 3;
static_assert(strings_equal(k_volumeRepresentatives[k_fluidOunceRepresentativeIndex].m_rootSymbol, "floz"), "Index for the Fluid Ounce Representative is incorrect.");
static constexpr int k_cupRepresentativeIndex = 4;
static_assert(strings_equal(k_volumeRepresentatives[k_cupRepresentativeIndex].m_rootSymbol, "cp"), "Index for the Cup Representative is incorrect.");
static_assert(strings_equal(k_volumeRepresentatives[k_cupRepresentativeIndex].m_rootSymbol, "cup"), "Index for the Cup Representative is incorrect.");
static constexpr int k_gallonRepresentativeIndex = 7;
static_assert(strings_equal(k_volumeRepresentatives[k_gallonRepresentativeIndex].m_rootSymbol, "gal"), "Index for the Gallon Representative is incorrect.");

View File

@@ -444,10 +444,10 @@ QUIZ_CASE(poincare_expression_additional_results) {
assert_additional_results_compute_to("3.6×_MN_m", array8, 2);
// Volume
const char * array9[2] = {"1000×_L", "264×_gal+2×_cp+6.022702×_floz"};
const char * array9[2] = {"1000×_L", "264×_gal+2×_cup+6.022702×_floz"};
assert_additional_results_compute_to("1×_m^3", array9, 2);
const char * array10[2] = {"182.5426×_L", "48×_gal+3×_cp+4.5×_floz"};
assert_additional_results_compute_to("12345×_Tbsp", array10, 2);
const char * array10[2] = {"182.5426×_L", "48×_gal+3×_cup+4.5×_floz"};
assert_additional_results_compute_to("12345×_tbsp", array10, 2);
// Speed
const char * array11[2] = {"3.6×_km×_h^\x12-1\x13", "2.236936×_mi×_h^\x12-1\x13"};