klayout/testdata/drc/drcSimpleTests_26.drc

51 lines
1.1 KiB
Plaintext

has_unbounded_range = ((RUBY_VERSION.split(".").map(&:to_i) <=> [2,7,0]) >= 0)
source $drc_test_source
target $drc_test_target
if $drc_test_deep
deep
end
l1 = input(1, 0)
l2 = input(2, 0)
l3 = input(3, 0)
l1.output(1, 0)
l2.output(2, 0)
l3.output(3, 0)
ar = 4.0/3.0 # "L" shape
l1.with_area_ratio(ar).output(100, 0)
l1.without_area_ratio(ar).output(101, 0)
if has_unbounded_range
l1.with_area_ratio(eval("ar+1e-6..")).output(102, 0)
else
l1.with_area_ratio(ar+1e-6..10000).output(102, 0)
end
l1.with_area_ratio(0.0, ar-1e-6).output(103, 0)
l1.squares.output(110, 0)
l1.non_squares.output(111, 0)
l2.with_bbox_aspect_ratio(2).output(120, 0)
l2.with_bbox_aspect_ratio(1).output(121, 0)
if has_unbounded_range
l2.with_bbox_aspect_ratio(eval("..1")).output(122, 0)
else
l2.with_bbox_aspect_ratio(0..1).output(122, 0)
end
l2.without_bbox_aspect_ratio(0..2).output(123, 0)
l2.with_relative_height(2).output(130, 0)
l2.with_relative_height(1).output(131, 0)
if has_unbounded_range
l2.with_relative_height(eval("..1")).output(132, 0)
else
l2.with_relative_height(0..1).output(132, 0)
end
l2.without_relative_height(0..2).output(133, 0)