Small bugfix and tests added to Gerber reader.

This commit is contained in:
Matthias Koefferlein 2017-09-09 10:26:50 +02:00
parent 17327ce19c
commit 98b7d0e9a1
3 changed files with 75 additions and 1 deletions

View File

@ -134,6 +134,7 @@ void
GerberFileReader::read (tl::TextInputStream &stream, db::Layout &layout, db::Cell &cell, const std::vector <unsigned int> &targets)
{
GraphicsState state;
state.global_trans = m_global_trans;
swap_graphics_state (state);
mp_stream = &stream;

View File

@ -140,6 +140,11 @@ RS274XReader::do_read ()
read_pf_parameter (get_block ());
} else if (param == "AD") {
read_ad_parameter (get_block ());
} else if (param == "TA" || param == "TD" || param == "TF") {
// TA, TD and TF paramters are skipped for layout
get_block ();
} else if (param == "AB") {
std::string dcode = get_block ();

View File

@ -180,7 +180,6 @@ TEST(24)
TEST(25)
{
test_is_long_runner ();
run_test (_this, "sr-sample2");
}
@ -190,3 +189,72 @@ TEST(26)
run_test (_this, "pos-neg");
}
TEST(X2_1)
{
run_test (_this, "x2-1");
}
TEST(X2_2a)
{
run_test (_this, "x2-2a");
}
TEST(X2_2b)
{
run_test (_this, "x2-2b");
}
TEST(X2_2c)
{
run_test (_this, "x2-2c");
}
TEST(X2_2d)
{
run_test (_this, "x2-2d");
}
TEST(X2_2e)
{
run_test (_this, "x2-2e");
}
TEST(X2_2f)
{
run_test (_this, "x2-2f");
}
TEST(X2_2g)
{
run_test (_this, "x2-2g");
}
TEST(X2_2h)
{
run_test (_this, "x2-2h");
}
TEST(X2_2i)
{
run_test (_this, "x2-2i");
}
TEST(X2_2j)
{
run_test (_this, "x2-2j");
}
TEST(X2_2k)
{
run_test (_this, "x2-2k");
}
TEST(X2_3)
{
run_test (_this, "x2-3");
}
TEST(X2_4)
{
run_test (_this, "x2-4");
}