Add FacadeFuzz

This commit is contained in:
2024-05-16 17:29:02 -07:00
parent 36779a068e
commit 1e1f5d6d5c
4 changed files with 132 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
#include "VersionedMap.h"
#include "Internal.h"
#include "KeyCompare.h"
#include "RootSet.h"
#include <assert.h>
@@ -390,17 +391,6 @@ auto operator<=>(const VersionedMap::Key &lhs, const Node &rhs) {
return lhs.len <=> rhs.entry->keyLen;
}
auto operator<=>(const VersionedMap::Key &lhs, const VersionedMap::Key &rhs) {
int cl = std::min(lhs.len, rhs.len);
if (cl > 0) {
int c = memcmp(lhs.p, rhs.p, cl);
if (c != 0) {
return c <=> 0;
}
}
return lhs.len <=> rhs.len;
}
constexpr int orderToInt(std::strong_ordering o) {
return o == std::strong_ordering::less ? -1
: o == std::strong_ordering::equal ? 0