Merge pull request 'Assert return values in test_update_zero_should_commit / conflict' (#50) from weaselbot/conflict-set:weaselbot/issue-49 into main
CI / release (arm64, ubuntu-latest-arm64) (push) Successful in 3m26s
CI / pre-commit (push) Successful in 2m5s
CI / test (-DCMAKE_BUILD_TYPE=Debug, debug) (push) Successful in 3m35s
CI / test (-DCMAKE_CXX_FLAGS=-DUSE_64_BIT=1, 64-bit-versions) (push) Successful in 3m28s
CI / test (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc) (push) Successful in 3m38s
CI / test (-DUSE_SIMD_FALLBACK=ON, simd-fallback) (push) Successful in 3m28s
CI / release (amd64, ubuntu-latest-amd64) (push) Successful in 4m56s
CI / coverage (push) Successful in 3m44s

Reviewed-on: #50
This commit was merged in pull request #50.
This commit is contained in:
2026-06-22 19:29:55 +00:00
+2 -2
View File
@@ -68,7 +68,7 @@ def test_update_zero_should_commit():
for i in range(256 - 17, 256):
cs2.addWrites(int(1), write(bytes([i])))
# Scan until first point write
cs2.check(read(0, b"\x00", bytes([256 - 17])))
assert cs2.check(read(0, b"\x00", bytes([256 - 17]))) == [Result.COMMIT]
def test_update_zero_should_conflict():
@@ -81,7 +81,7 @@ def test_update_zero_should_conflict():
# "zero" is now 2**31 + 100
cs1.addWrites(2**32 + 101, write(b"", b"\x02"), write(b"\x01"))
# rangeVersion of \x01 is now 2**31 + 100 ("max" of (2**31 + 100, 2**32 + 101))
cs1.check(read(2**32 + 1, b"\x00"))
assert cs1.check(read(2**32 + 1, b"\x00")) == [Result.CONFLICT]
# but 2**32 + 1 ">" 2**31 + 100 , and it incorrectly commits