mirror of https://github.com/KLayout/klayout.git
Added DRC test for interact with count
This commit is contained in:
parent
56572bd481
commit
bc98336d2a
|
|
@ -876,3 +876,43 @@ TEST(19_shielding)
|
|||
db::compare_layouts (_this, layout, au, db::NoNormalization);
|
||||
}
|
||||
|
||||
TEST(20_interact_with_count)
|
||||
{
|
||||
std::string rs = tl::testsrc ();
|
||||
rs += "/testdata/drc/drcSimpleTests_20.drc";
|
||||
|
||||
std::string input = tl::testsrc ();
|
||||
input += "/testdata/drc/drcSimpleTests_20.gds";
|
||||
|
||||
std::string au = tl::testsrc ();
|
||||
au += "/testdata/drc/drcSimpleTests_au20.gds";
|
||||
|
||||
std::string output = this->tmp_file ("tmp.gds");
|
||||
|
||||
{
|
||||
// Set some variables
|
||||
lym::Macro config;
|
||||
config.set_text (tl::sprintf (
|
||||
"$drc_test_source = '%s'\n"
|
||||
"$drc_test_target = '%s'\n"
|
||||
, input, output)
|
||||
);
|
||||
config.set_interpreter (lym::Macro::Ruby);
|
||||
EXPECT_EQ (config.run (), 0);
|
||||
}
|
||||
|
||||
lym::Macro drc;
|
||||
drc.load_from (rs);
|
||||
EXPECT_EQ (drc.run (), 0);
|
||||
|
||||
db::Layout layout;
|
||||
|
||||
{
|
||||
tl::InputStream stream (output);
|
||||
db::Reader reader (stream);
|
||||
reader.read (layout);
|
||||
}
|
||||
|
||||
db::compare_layouts (_this, layout, au, db::NoNormalization);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
|
||||
# Hierarchical antenna check
|
||||
|
||||
source($drc_test_source, "TOP")
|
||||
target($drc_test_target)
|
||||
|
||||
l1 = input(1, 0)
|
||||
l2 = input(2, 0)
|
||||
|
||||
l1.output(1, 0)
|
||||
l2.output(2, 0)
|
||||
|
||||
l1.interacting(l2, 1).output(100, 0)
|
||||
l1.interacting(l2, 2).output(101, 0)
|
||||
l1.interacting(l2, 1..2).output(102, 0)
|
||||
l1.interacting(l2, 2..).output(103, 0)
|
||||
l1.interacting(l2, 1, 2).output(104, 0)
|
||||
|
||||
l = l1.dup
|
||||
l.select_interacting(l2, 1)
|
||||
l.output(200, 0)
|
||||
l = l1.dup
|
||||
l.select_interacting(l2, 2)
|
||||
l.output(201, 0)
|
||||
l = l1.dup
|
||||
l.select_interacting(l2, 1..2)
|
||||
l.output(202, 0)
|
||||
l = l1.dup
|
||||
l.select_interacting(l2, 2..)
|
||||
l.output(203, 0)
|
||||
l = l1.dup
|
||||
l.select_interacting(l2, 1, 2)
|
||||
l.output(204, 0)
|
||||
|
||||
l1.not_interacting(l2, 1).output(300, 0)
|
||||
l1.not_interacting(l2, 2).output(301, 0)
|
||||
l1.not_interacting(l2, 1..2).output(302, 0)
|
||||
l1.not_interacting(l2, 2..).output(303, 0)
|
||||
l1.not_interacting(l2, 1, 2).output(304, 0)
|
||||
|
||||
l = l1.dup
|
||||
l.select_not_interacting(l2, 1)
|
||||
l.output(400, 0)
|
||||
l = l1.dup
|
||||
l.select_not_interacting(l2, 2)
|
||||
l.output(401, 0)
|
||||
l = l1.dup
|
||||
l.select_not_interacting(l2, 1..2)
|
||||
l.output(402, 0)
|
||||
l = l1.dup
|
||||
l.select_not_interacting(l2, 2..)
|
||||
l.output(403, 0)
|
||||
l = l1.dup
|
||||
l.select_not_interacting(l2, 1, 2)
|
||||
l.output(404, 0)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue