mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\functional\datatypes\test_int128_binary_operations.py: Adjusted output - see notes.
This commit is contained in:
parent
5923afd26b
commit
8796afbfac
@ -9,6 +9,11 @@ DESCRIPTION:
|
||||
Test verifies https://github.com/FirebirdSQL/firebird/commit/137c3a96e51b8bc34cb74732687067e96c971226
|
||||
(Postfix for #6583: enable support of int128 in bin_* family of functions).
|
||||
FBTEST: functional.datatypes.int128_binary_operations
|
||||
NOTES:
|
||||
[20.06.2023] pzotov
|
||||
Evaluation of bin_shr(-2^127, 127) should give result of -1. Before 5.0.0.1082 it was wrong: +1.
|
||||
Checked on 5.0.0.1082.
|
||||
Fix for FB 4.x will be soon (message from Alex, 20.06.2023 08:42).
|
||||
"""
|
||||
|
||||
import pytest
|
||||
@ -33,7 +38,9 @@ test_script = """
|
||||
select bin_not(bi_least) from test_i128; -- expected: 170141183460469231731687303715884105727
|
||||
select bin_not(bi_great) from test_i128; -- expected: -170141183460469231731687303715884105728
|
||||
select bin_or(bi_least, bi_great) from test_i128; -- expected: -1
|
||||
select bin_shr(bi_least,127) from test_i128; -- expected: 1
|
||||
|
||||
select bin_shr(bi_least,127) from test_i128; -- proper result: -1; before 5.0.0.1082 was wrong: +1
|
||||
|
||||
select bin_shr(bi_great,127) from test_i128; -- expected: 0
|
||||
select bin_shl(bi_least,127) from test_i128; -- expected: 0
|
||||
select bin_and( bin_shl(bi_great,127), bi_least) from test_i128; -- expected: -170141183460469231731687303715884105728
|
||||
@ -49,7 +56,7 @@ expected_stdout = """
|
||||
170141183460469231731687303715884105727
|
||||
-170141183460469231731687303715884105728
|
||||
-1
|
||||
1
|
||||
-1
|
||||
0
|
||||
0
|
||||
-170141183460469231731687303715884105728
|
||||
|
Loading…
Reference in New Issue
Block a user