Fixed unit tests and MSVC build

This commit is contained in:
Matthias Koefferlein
2023-08-05 21:02:26 +02:00
parent 76a1450f32
commit d958d71e2e
5 changed files with 27 additions and 27 deletions
+2 -2
View File
@@ -579,8 +579,8 @@ Path round_path_corners (const Path &path, int rad, int n)
return Path (round_path_corners (db::DPath (path), double (rad), n, 0.5));
}
template class path<Coord>;
template class path<DCoord>;
template class DB_PUBLIC path<Coord>;
template class DB_PUBLIC path<DCoord>;
// explicit instantiations
template DB_PUBLIC void path<Coord>::create_shifted_points (Coord, Coord, Coord, bool, path<Coord>::pointlist_type::iterator, path<Coord>::pointlist_type::iterator, int, box_inserter<path<Coord>::box_type>) const;
+6 -6
View File
@@ -121,22 +121,22 @@ std::string text<C>::to_string (double dbu) const
return s;
}
template class text<Coord>;
template class text<DCoord>;
template class DB_PUBLIC text<Coord>;
template class DB_PUBLIC text<DCoord>;
}
namespace tl
{
template<> void extractor_impl (tl::Extractor &ex, db::Text &p)
template<> DB_PUBLIC void extractor_impl (tl::Extractor &ex, db::Text &p)
{
if (! test_extractor_impl (ex, p)) {
ex.error (tl::to_string (tr ("Expected a text specification")));
}
}
template<> void extractor_impl (tl::Extractor &ex, db::DText &p)
template<> DB_PUBLIC void extractor_impl (tl::Extractor &ex, db::DText &p)
{
if (! test_extractor_impl (ex, p)) {
ex.error (tl::to_string (tr ("Expected a text specification")));
@@ -189,12 +189,12 @@ template<class C> bool _test_extractor_impl (tl::Extractor &ex, db::text<C> &t)
}
}
template<> bool test_extractor_impl (tl::Extractor &ex, db::Text &p)
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::Text &p)
{
return _test_extractor_impl (ex, p);
}
template<> bool test_extractor_impl (tl::Extractor &ex, db::DText &p)
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::DText &p)
{
return _test_extractor_impl (ex, p);
}
+7 -7
View File
@@ -1167,7 +1167,7 @@ TEST(5)
EXPECT_EQ (r.text (),
"layout_diff: texts differ for layer 17/0 in cell c2x\n"
"Not in b but in a:\n"
" ('X',r90 2,3)\n"
" ('X',r90 2,3) s=17\n"
"Not in a but in b:\n"
);
@@ -1198,10 +1198,10 @@ TEST(5)
"layout_diff: texts differ for layer 17/0 in cell c2x\n"
"Not in b but in a:\n"
"Not in a but in b:\n"
" ('X',r90 2,3)\n"
" ('Y',r90 2,3)\n"
" ('X',r90 3,4)\n"
" ('X',r180 2,3)\n"
" ('X',r90 2,3) s=18\n"
" ('Y',r90 2,3) s=17\n"
" ('X',r90 3,4) s=17\n"
" ('X',r180 2,3) s=17\n"
);
// two more to match more of h:
@@ -1216,8 +1216,8 @@ TEST(5)
"layout_diff: texts differ for layer 17/0 in cell c2x\n"
"Not in b but in a:\n"
"Not in a but in b:\n"
" ('Y',r90 2,3)\n"
" ('X',r180 2,3)\n"
" ('Y',r90 2,3) s=17\n"
" ('X',r180 2,3) s=17\n"
);
}