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
13 lines
364 B
Python
13 lines
364 B
Python
from conflict_set import *
|
|
|
|
|
|
def test_conflict_set():
|
|
with ConflictSet() as cs:
|
|
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, key)) == [Result.TOO_OLD]
|