MCPcopy Create free account
hub / github.com/KLayout/klayout / test_1

Method test_1

testdata/ruby/laySaveLayoutOptions.rb:29–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28 # SaveLayoutOptions tests
29 def test_1
30
31 opt = RBA::SaveLayoutOptions::new
32
33 # just smoke test - no query methods, so we can't check the results
34 opt.add_cell(1)
35 opt.add_this_cell(1)
36 opt.add_layer(1, RBA::LayerInfo::new(17, 5))
37 opt.clear_cells
38 opt.deselect_all_layers
39 opt.select_cell(1)
40 opt.select_this_cell(1)
41 opt.select_all_cells
42 opt.select_all_layers
43
44 assert_equal(opt.dbu, 0.0)
45 opt.dbu = 0.5
46 assert_equal(opt.dbu, 0.5)
47
48 assert_equal(opt.libname, "")
49 opt.libname = "ABC"
50 assert_equal(opt.libname, "ABC")
51 assert_equal(opt.gds2_libname, "ABC")
52 opt.gds2_libname = "X"
53 assert_equal(opt.libname, "X")
54 assert_equal(opt.gds2_libname, "X")
55
56 opt.scale_factor = 1.5
57 assert_equal(opt.scale_factor, 1.5)
58
59 opt.keep_instances = false
60 assert_equal(opt.keep_instances?, false)
61 opt.keep_instances = true
62 assert_equal(opt.keep_instances?, true)
63
64 opt.write_context_info = false
65 assert_equal(opt.write_context_info?, false)
66 opt.write_context_info = true
67 assert_equal(opt.write_context_info?, true)
68
69 opt.no_empty_cells = false
70 assert_equal(opt.no_empty_cells?, false)
71 opt.no_empty_cells = true
72 assert_equal(opt.no_empty_cells?, true)
73
74 opt.format = "CIF"
75 assert_equal(opt.format, "CIF")
76 opt.format = "DXF"
77 assert_equal(opt.format, "DXF")
78
79 opt.cif_blank_separator = true
80 assert_equal(opt.cif_blank_separator?, true)
81 opt.cif_blank_separator = false
82 assert_equal(opt.cif_blank_separator?, false)
83
84 opt.cif_dummy_calls = true
85 assert_equal(opt.cif_dummy_calls?, true)
86 opt.cif_dummy_calls = false

Callers

nothing calls this directly

Calls 13

add_this_cellMethod · 0.80
add_layerMethod · 0.80
clear_cellsMethod · 0.80
deselect_all_layersMethod · 0.80
select_cellMethod · 0.80
select_all_layersMethod · 0.80
scale_factorMethod · 0.80
add_cellMethod · 0.45
select_all_cellsMethod · 0.45
dbuMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected