diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-13 17:57:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-13 17:57:19 +0000 |
commit | 440b2f2a8fe3b1328d2166a83ab56a12bedc624c (patch) | |
tree | 02326974419db3aefc05d556d6e218ae8a92e480 /Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp | |
parent | 8be6eac70738a24fd3b7609bf9447b84a4237025 (diff) |
import original dvisvgm-2.1.2
git-svn-id: svn://tug.org/texlive/trunk@43208 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp index 2b05429a3ac..720253e83b2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp @@ -19,6 +19,7 @@ *************************************************************************/ #include <gtest/gtest.h> +#include <memory> #include "CMap.hpp" #include "CMapReader.hpp" @@ -28,14 +29,14 @@ using namespace std; class CMapReaderTest : public ::testing::Test { protected: - void SetUp () { + CMapReaderTest () { istringstream iss(cmapsrc); CMapReader reader; - cmap = reader.read(iss, "Test-Map"); + cmap.reset(reader.read(iss, "Test-Map")); } static const char *cmapsrc; - CMap *cmap; + unique_ptr<CMap> cmap; }; @@ -105,7 +106,7 @@ TEST_F(CMapReaderTest, bfcode) { } TEST_F(CMapReaderTest, cid) { - SegmentedCMap *seg_cmap = dynamic_cast<SegmentedCMap*>(cmap); + const SegmentedCMap *seg_cmap = dynamic_cast<const SegmentedCMap*>(cmap.get()); ASSERT_TRUE(seg_cmap != 0); ASSERT_EQ(seg_cmap->numBFRanges(), 9); ASSERT_EQ(seg_cmap->numCIDRanges(), 2); |