Class: TdlSimTest::TdlSelTestUnit
- Inherits:
-
TdlBaseTestUnit
- Object
- TdlBaseTestUnit
- TdlSimTest::TdlSelTestUnit
- Defined in:
- lib/tdl/exlib/sdlmodule_sim.bak.rb
Instance Attribute Summary
Attributes inherited from TdlBaseTestUnit
Instance Method Summary collapse
- #echo_info ⇒ Object
- #echo_info_array ⇒ Object
-
#initialize(name: 'TdlSelTestUnit-0', sel_range: [], value_default: nil, sim_target_hash: nil) ⇒ TdlSelTestUnit
constructor
A new instance of TdlSelTestUnit.
Methods inherited from TdlBaseTestUnit
check_same_test_name, echo_prj_test_list, load_test_unit_hash, test_unit_hash, test_unit_hash=, top_sim_list, top_sim_list=, #use_default?, #value
Constructor Details
#initialize(name: 'TdlSelTestUnit-0', sel_range: [], value_default: nil, sim_target_hash: nil) ⇒ TdlSelTestUnit
Returns a new instance of TdlSelTestUnit.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/tdl/exlib/sdlmodule_sim.bak.rb', line 155 def initialize(name: 'TdlSelTestUnit-0',sel_range: [],value_default: nil, sim_target_hash: nil) super name @name = name @sel_range = sel_range if value_default unless sel_range.include? value_default raise TdlError.new "DEFAULT:: #{value_default} not in range[#{sel_range.map{|e| e.to_s }.join(",")}]" end end @value_default = value_default @sim_target = sim_target_hash[name] if @sim_target @active = true unless sel_range.include? @sim_target if @sim_target != true raise TdlError.new " SIM TARGET:: #{@sim_target} not in range[#{sel_range.map{|e| e.to_s }.join(",")}]" end end end end |
Instance Method Details
#echo_info ⇒ Object
182 183 184 |
# File 'lib/tdl/exlib/sdlmodule_sim.bak.rb', line 182 def echo_info echo_info_array.map{ |e| e.to_s }.join(" ## ") end |
#echo_info_array ⇒ Object
177 178 179 180 |
# File 'lib/tdl/exlib/sdlmodule_sim.bak.rb', line 177 def echo_info_array # test type :: test name :: test value :: test default ? :: tset others ['SEL-UNIT',@name,active_symb,value(), use_default?(), @sel_range.map{|e| e.to_s }.join(",") ] end |