Add inner-full-word test
All checks were successful
Tests / Clang total: 934, passed: 934
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc] total: 934, passed: 934
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 933, passed: 933
Tests / Coverage total: 932, passed: 932
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-03-17 14:42:11 -07:00
parent 1a51aa00e5
commit 5aab76847a
3 changed files with 233 additions and 13 deletions

View File

@@ -507,6 +507,18 @@ inline std::string printable(std::span<const uint8_t> key) {
return printable(std::string_view((const char *)key.data(), key.size()));
}
inline const char *resultToStr(ConflictSet::Result r) {
switch (r) {
case ConflictSet::Commit:
return "commit";
case ConflictSet::Conflict:
return "conflict";
case ConflictSet::TooOld:
return "too old";
}
abort();
}
namespace {
template <class ConflictSetImpl> struct TestDriver {
@@ -523,18 +535,6 @@ template <class ConflictSetImpl> struct TestDriver {
bool ok = true;
static const char *resultToStr(ConflictSet::Result r) {
switch (r) {
case ConflictSet::Commit:
return "commit";
case ConflictSet::Conflict:
return "conflict";
case ConflictSet::TooOld:
return "too old";
}
abort();
}
// Call until it returns true, for "done". Check internal invariants etc
// between calls to next.
bool next() {