Add getBytes to conflict_set.py
All checks were successful
Tests / Clang total: 1096, passed: 1096
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / SIMD fallback total: 1096, passed: 1096
Tests / Release [gcc] total: 1096, passed: 1096
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 824, passed: 824
Tests / Coverage total: 823, passed: 823
weaselab/conflict-set/pipeline/head This commit looks good
All checks were successful
Tests / Clang total: 1096, passed: 1096
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / SIMD fallback total: 1096, passed: 1096
Tests / Release [gcc] total: 1096, passed: 1096
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 824, passed: 824
Tests / Coverage total: 823, passed: 823
weaselab/conflict-set/pipeline/head This commit looks good
This commit is contained in:
@@ -3,7 +3,10 @@ from conflict_set import *
|
||||
|
||||
def test_conflict_set():
|
||||
with ConflictSet() as cs:
|
||||
cs.addWrites(1, write(b""))
|
||||
assert cs.check(read(0, b"")) == [Result.CONFLICT]
|
||||
before = cs.getBytes()
|
||||
key = b"a key"
|
||||
cs.addWrites(1, write(key))
|
||||
assert cs.getBytes() - before > 0
|
||||
assert cs.check(read(0, key)) == [Result.CONFLICT]
|
||||
cs.setOldestVersion(1)
|
||||
assert cs.check(read(0, b"")) == [Result.TOO_OLD]
|
||||
assert cs.check(read(0, key)) == [Result.TOO_OLD]
|
||||
|
Reference in New Issue
Block a user