2 Commits

Author SHA1 Message Date
add0af11ad Don't check paper/version.txt into version control
Some checks reported errors
weaselab/conflict-set/pipeline/head Something is wrong with the build of this commit
But also don't remove it in `make -C paper clean`
2024-06-25 19:21:14 -07:00
2c0adf4a8b Fix test-only bug in script test
Previously conflict_set.py only worked for checking one read conflict
per call
2024-06-25 19:20:19 -07:00
5 changed files with 6 additions and 4 deletions

View File

@@ -115,7 +115,9 @@ class ConflictSet:
def check(self, *reads: ReadRange) -> list[Result]: def check(self, *reads: ReadRange) -> list[Result]:
r = (ctypes.c_int * len(reads))() r = (ctypes.c_int * len(reads))()
self._lib.ConflictSet_check(self.p, *reads, r, 1) self._lib.ConflictSet_check(
self.p, (ReadRange * len(reads))(*reads), r, len(reads)
)
return [Result(x) for x in r] return [Result(x) for x in r]
def setOldestVersion(self, version: int) -> None: def setOldestVersion(self, version: int) -> None:

1
paper/.gitignore vendored
View File

@@ -10,3 +10,4 @@
*.pdf *.pdf
*.run.xml *.run.xml
*.synctex.gz *.synctex.gz
version.txt

View File

@@ -6,4 +6,4 @@ paper.pdf: paper.tex $(wildcard *.tikz)
latexmk -pdf latexmk -pdf
clean: clean:
xargs -I '{}' bash -c "rm -f {}" < .gitignore grep -v version.txt .gitignore |xargs -I '{}' bash -c "rm -f {}"

View File

@@ -1 +0,0 @@
\providecommand{\versionnumber}{0.0.6}

View File

@@ -53,7 +53,7 @@ def test_conflict_set():
assert cs.getBytes() - before > 0 assert cs.getBytes() - before > 0
assert cs.check(read(0, key)) == [Result.CONFLICT] assert cs.check(read(0, key)) == [Result.CONFLICT]
cs.setOldestVersion(1) cs.setOldestVersion(1)
assert cs.check(read(0, key)) == [Result.TOO_OLD] assert cs.check(read(0, key), read(1, key)) == [Result.TOO_OLD, Result.COMMIT]
def test_inner_full_words(): def test_inner_full_words():