diff options
author | Karl Berry <karl@freefriends.org> | 2018-08-31 23:11:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-08-31 23:11:41 +0000 |
commit | 8ba2cf02688200d56e4fe0839a451ef832ce15b6 (patch) | |
tree | fcec1a50903a6e5b939859a1f92e15342636f290 /Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp | |
parent | 5d0960aa5419651a9c9b6503e44be2f098831ef1 (diff) |
dvisvgm 2.5, including potrace now bundled with dvisvgm instead of under libs/
git-svn-id: svn://tug.org/texlive/trunk@48527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp index ad8c5f36af9..cf665d6a384 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp @@ -232,4 +232,20 @@ TEST(LengthTest, toString) { EXPECT_EQ(Length(10, Length::Unit::DD).toString(Length::Unit::DD), "10dd"); EXPECT_EQ(Length(10, Length::Unit::CC).toString(Length::Unit::CC), "10cc"); EXPECT_EQ(Length(10, Length::Unit::SP).toString(Length::Unit::SP), "10sp"); -}
\ No newline at end of file +} + + +TEST(LengthTest, literals) { + EXPECT_EQ(1_pt, Length(1, "pt")); + EXPECT_EQ(2_bp, Length(2, "bp")); + EXPECT_EQ(3_in, Length(3, "in")); + EXPECT_EQ(5_mm, Length(5, "mm")); +} + + +TEST(LengthTest, getUnits) { + for (auto unit : Length::getUnits()) { + EXPECT_EQ(unit.first, Length::unitToString(unit.second)); + EXPECT_EQ(unit.second, Length::stringToUnit(unit.first)); + } +} |