UniSet 2.45.1
Класс tests.test_type_system.TestResolveType

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

 test_bool_literal (self)
 test_int_literal (self)
 test_dint_literal (self)
 test_real_literal (self)
 test_variable_reference (self)
 test_variable_reference_real (self)
 test_arithmetic_int_int (self)
 test_arithmetic_int_real_promotes_to_real (self)
 test_arithmetic_dint_int (self)
 test_comparison_returns_bool (self)
 test_logical_and_returns_bool (self)
 test_unary_not_returns_bool (self)
 test_unary_negate_preserves_type (self)
 test_type_coercion_node_returns_to_type (self)
 test_modulo_int_int (self)

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

Tests for resolve_type() function.

Методы

◆ test_arithmetic_dint_int()

tests.test_type_system.TestResolveType.test_arithmetic_dint_int ( self)
DINT + INT -> DINT.

◆ test_arithmetic_int_int()

tests.test_type_system.TestResolveType.test_arithmetic_int_int ( self)
INT + INT -> INT.

◆ test_arithmetic_int_real_promotes_to_real()

tests.test_type_system.TestResolveType.test_arithmetic_int_real_promotes_to_real ( self)
INT + REAL -> REAL.

◆ test_comparison_returns_bool()

tests.test_type_system.TestResolveType.test_comparison_returns_bool ( self)
x > 10 -> BOOL.

◆ test_logical_and_returns_bool()

tests.test_type_system.TestResolveType.test_logical_and_returns_bool ( self)
BOOL AND BOOL -> BOOL.

◆ test_modulo_int_int()

tests.test_type_system.TestResolveType.test_modulo_int_int ( self)
INT MOD INT -> INT.

◆ test_type_coercion_node_returns_to_type()

tests.test_type_system.TestResolveType.test_type_coercion_node_returns_to_type ( self)
IRTypeCoercion reports its to_type.

◆ test_unary_negate_preserves_type()

tests.test_type_system.TestResolveType.test_unary_negate_preserves_type ( self)
-int_expr -> INT.

◆ test_unary_not_returns_bool()

tests.test_type_system.TestResolveType.test_unary_not_returns_bool ( self)
NOT bool_expr -> BOOL.