From 45fc4baafa8740e17cb807d93efe2fc4a3dbb83b Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 28 Jul 2021 16:38:29 +0200 Subject: [PATCH] Update tests. --- .../smtCheckerTests/operators/fixed_point_compound_add.sol | 1 + .../smtCheckerTests/operators/shifts/shr_unused.sol | 2 +- .../315_fixed_type_invalid_implicit_conversion_size.sol | 2 +- .../317_fixed_type_valid_explicit_conversions.sol | 4 ++-- .../328_rational_to_fixed_literal_expression.sol | 4 ++-- test/libsolidity/syntaxTests/signed_rational_modulus.sol | 3 ++- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test/libsolidity/smtCheckerTests/operators/fixed_point_compound_add.sol b/test/libsolidity/smtCheckerTests/operators/fixed_point_compound_add.sol index ac714c2f5..004d225b9 100644 --- a/test/libsolidity/smtCheckerTests/operators/fixed_point_compound_add.sol +++ b/test/libsolidity/smtCheckerTests/operators/fixed_point_compound_add.sol @@ -5,3 +5,4 @@ contract C { // ==== // SMTEngine: all // ---- +// TypeError 7366: (52-61): Operator += not compatible with types fixed128x18 and int_const 1 diff --git a/test/libsolidity/smtCheckerTests/operators/shifts/shr_unused.sol b/test/libsolidity/smtCheckerTests/operators/shifts/shr_unused.sol index c39cdc7d1..b9bb7f110 100644 --- a/test/libsolidity/smtCheckerTests/operators/shifts/shr_unused.sol +++ b/test/libsolidity/smtCheckerTests/operators/shifts/shr_unused.sol @@ -7,4 +7,4 @@ contract C { // ==== // SMTEngine: all // ---- -// UnimplementedFeatureError: Not yet implemented - FixedPointType. +// TypeError 2271: (61-68): Operator >>> not compatible with types fixed128x18 and int_const 6. Arithmetic operators on fixed point types are not yet supported. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol index 3a4923563..f61943f09 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/315_fixed_type_invalid_implicit_conversion_size.sol @@ -5,4 +5,4 @@ contract test { } } // ---- -// TypeError 9574: (75-92): Type ufixed128x18 is not implicitly convertible to expected type ufixed248x8. Too many fractional digits. +// TypeError 9574: (75-92): Type ufixed128x18 is not implicitly convertible to expected type ufixed248x8. Conversion would incur precision loss - use explicit conversion instead. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol index 4899b3d78..99f9bad14 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/317_fixed_type_valid_explicit_conversions.sol @@ -1,7 +1,7 @@ contract test { function f() public { - ufixed256x80 a = ufixed256x80(1/3); a; - ufixed248x80 b = ufixed248x80(1/3); b; + ufixed256x18 a = ufixed256x18(1/3); a; + ufixed248x18 b = ufixed248x18(1/3); b; ufixed8x1 c = ufixed8x1(1/3); c; } } diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol index 4dbcb3f20..6f6c786f7 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/328_rational_to_fixed_literal_expression.sol @@ -4,8 +4,8 @@ contract test { ufixed64x8 b = 4 - 2.5; ufixed64x8 c = 11 / 4; ufixed240x5 d = 599 + 0.21875; - ufixed256x80 e = ufixed256x80(35.245 % 12.9); - ufixed256x80 f = ufixed256x80(1.2 % 2); + ufixed256x18 e = ufixed256x18(35.245 % 12.9); + ufixed256x18 f = ufixed256x18(1.2 % 2); fixed g = 2 ** -2; a; b; c; d; e; f; g; } diff --git a/test/libsolidity/syntaxTests/signed_rational_modulus.sol b/test/libsolidity/syntaxTests/signed_rational_modulus.sol index 999086ae1..7121e7d85 100644 --- a/test/libsolidity/syntaxTests/signed_rational_modulus.sol +++ b/test/libsolidity/syntaxTests/signed_rational_modulus.sol @@ -7,4 +7,5 @@ contract test { } } // ---- -// TypeError 2271: (117-123): Operator % not compatible with types rational_const 1 / 2 and fixed128x18. Fractional literals not supported. +// TypeError 2271: (117-123): Operator % not compatible with types rational_const 1 / 2 and fixed128x18. Arithmetic operators on fixed point types are not yet supported. +// TypeError 2271: (143-148): Operator % not compatible with types fixed128x18 and fixed128x18. Arithmetic operators on fixed point types are not yet supported.