mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-04 16:50:09 +02:00
[consider merging] avoid a crash during certain queries
This query used to crash: "instances of cell .*.* where inst.trans.rot == 2" on a layout with 1 hierarchy level and some cells with rot 180 degree
This commit is contained in:
@@ -1578,3 +1578,20 @@ TEST(64)
|
||||
EXPECT_EQ (s, "0.01,-0.02,-0.01,0.02,-0.01,0.02,-0.01,0.02,0.01,-0.02,-0.01,0.02");
|
||||
}
|
||||
}
|
||||
|
||||
TEST(65)
|
||||
{
|
||||
db::Layout g;
|
||||
init_layout (g);
|
||||
|
||||
{
|
||||
db::LayoutQuery q ("instances of cell .*.* where inst.trans.rot == 0");
|
||||
db::LayoutQueryIterator iq (q, &g);
|
||||
std::string s = q2s_var (iq, "data");
|
||||
EXPECT_EQ (s, "nil,nil");
|
||||
s = q2s_var (iq, "cell_name");
|
||||
EXPECT_EQ (s, "c1,c5x");
|
||||
s = q2s_var (iq, "inst_elements");
|
||||
EXPECT_EQ (s, "(cell_index=0 r0 *1 10,-20),(cell_index=4 r0 *1 10,-20)");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user