Skip to content

Commit

Permalink
Merge branch 'reorder_string_generation' of https://github.com/LLNL/u…
Browse files Browse the repository at this point in the history
…nits into reorder_string_generation
  • Loading branch information
phlptp committed Aug 5, 2023
2 parents d6f2a2f + 92f9b71 commit 168b12d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions test/test_unit_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,10 @@ TEST(unitStrings, Hertz)

TEST(unitStrings, singleBase)
{
EXPECT_EQ(to_string(precise::kilo*precise::J/precise::mol), "kJ/mol");
EXPECT_EQ(to_string(precise::kilo*precise::J/precise::rad.pow(2)), "kJ/rad^2");
EXPECT_EQ(to_string(precise::kilo * precise::J / precise::mol), "kJ/mol");
EXPECT_EQ(
to_string(precise::kilo * precise::J / precise::rad.pow(2)),
"kJ/rad^2");
}

TEST(unitStrings, watthours)
Expand Down Expand Up @@ -1570,7 +1572,6 @@ TEST(defaultUnits, singleCharacter)
EXPECT_EQ(precise::K, default_unit("\xC8"));
}


#ifdef ENABLE_UNIT_TESTING
TEST(stringGeneration, test1)
{
Expand Down
2 changes: 1 addition & 1 deletion units/units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ static std::string
return res;
}
}

if (allowUserDefinedUnits.load(std::memory_order_acquire)) {
for (const auto& udu : user_defined_unit_names) {
auto str = probeUnitBase(
Expand Down

0 comments on commit 168b12d

Please sign in to comment.