UniSet 2.45.1
Класс tests.test_codegen_scale.TestScaleFactorInput

Открытые члены

 test_input_scale_emits_division (self)
 test_input_scale_uses_st_name_in_body (self)
 test_input_scale_at_top_of_on_step (self)
 test_no_scale_no_division (self)
 test_input_scale_float_factor (self)
 test_multiple_input_scales (self)

Подробное описание

Test scale factor on REAL input: division at top of uniset_on_step.

Методы

◆ test_input_scale_at_top_of_on_step()

tests.test_codegen_scale.TestScaleFactorInput.test_input_scale_at_top_of_on_step ( self)
Scale factor conversion should appear at the top of uniset_on_step().

◆ test_input_scale_emits_division()

tests.test_codegen_scale.TestScaleFactorInput.test_input_scale_emits_division ( self)
REAL input with scale: 100 -> let Temperature = in_AI_Temp_S / 100;

◆ test_input_scale_float_factor()

tests.test_codegen_scale.TestScaleFactorInput.test_input_scale_float_factor ( self)
Scale factor can be a float like 10.5.

◆ test_input_scale_uses_st_name_in_body()

tests.test_codegen_scale.TestScaleFactorInput.test_input_scale_uses_st_name_in_body ( self)
Body should use the ST variable name, not in_ prefixed.

◆ test_multiple_input_scales()

tests.test_codegen_scale.TestScaleFactorInput.test_multiple_input_scales ( self)
Multiple inputs with scale factors generate multiple conversion lines.

◆ test_no_scale_no_division()

tests.test_codegen_scale.TestScaleFactorInput.test_no_scale_no_division ( self)
Input without scale factor should not emit division line.