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

Method test_common_options

testdata/ruby/dbReaders.rb:29–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28 # Common Options
29 def test_common_options
30
31 opt = RBA::LoadLayoutOptions::new
32
33 assert_equal(opt.warn_level, 1)
34 opt.warn_level = 2
35 assert_equal(opt.warn_level, 2)
36
37 lm = RBA::LayerMap::new
38 lm.map(RBA::LayerInfo::new(1, 0), 2, RBA::LayerInfo::new(42, 17))
39 opt.set_layer_map(lm, true)
40
41 assert_equal(opt.layer_map.to_string, "1/0 : 42/17\n")
42 assert_equal(opt.create_other_layers?, true)
43
44 opt.create_other_layers = false
45 assert_equal(opt.create_other_layers?, false)
46
47 opt.select_all_layers
48 assert_equal(opt.layer_map.to_string, "")
49 assert_equal(opt.create_other_layers?, true)
50
51 opt.text_enabled = true
52 assert_equal(opt.text_enabled?, true)
53 opt.text_enabled = false
54 assert_equal(opt.text_enabled?, false)
55
56 opt.properties_enabled = true
57 assert_equal(opt.properties_enabled?, true)
58 opt.properties_enabled = false
59 assert_equal(opt.properties_enabled?, false)
60
61 assert_equal(opt.cell_conflict_resolution, RBA::LoadLayoutOptions::AddToCell)
62 opt.cell_conflict_resolution = RBA::LoadLayoutOptions::OverwriteCell
63 assert_equal(opt.cell_conflict_resolution, RBA::LoadLayoutOptions::OverwriteCell)
64 opt.cell_conflict_resolution = RBA::LoadLayoutOptions::SkipNewCell
65 assert_equal(opt.cell_conflict_resolution, RBA::LoadLayoutOptions::SkipNewCell)
66 opt.cell_conflict_resolution = RBA::LoadLayoutOptions::RenameCell
67 assert_equal(opt.cell_conflict_resolution, RBA::LoadLayoutOptions::RenameCell)
68
69 end
70
71 # GDS2 Options
72 def test_gds2_options

Callers

nothing calls this directly

Calls 4

select_all_layersMethod · 0.80
mapMethod · 0.45
set_layer_mapMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected