mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-04 16:50:09 +02:00
Layout queries support diff as placeholder for the current cell
This commit is contained in:
@@ -515,6 +515,14 @@ TEST(1)
|
||||
EXPECT_EQ (s, "c1,c4,c5x");
|
||||
}
|
||||
|
||||
{
|
||||
// $_ is a placeholder for the current cell
|
||||
db::LayoutQuery q ("$_.*");
|
||||
db::LayoutQueryIterator iq (q, &g, &g.cell (g.cell_by_name ("c4").second));
|
||||
std::string s = q2s_var (iq, "cell_name");
|
||||
EXPECT_EQ (s, "c1,c3"); // child cells of "c4"
|
||||
}
|
||||
|
||||
{
|
||||
// Another way of saying "c2x.*"
|
||||
db::LayoutQuery q ("*.$(cell_name=='c2x'?'*':'')");
|
||||
|
||||
Reference in New Issue
Block a user