Q-W1 code-review follow-ups: restore 104 trailing newlines, relocate reasampler_uid.h to core/wire, drop ext_keys namespaces shim, add slot_map_tests, golden serialize literals for 4 modules, namespaces.h/pragma-once ordering sweep. 60/60 green.
This commit is contained in:
@@ -36,6 +36,18 @@ static void testEmptyManifest() {
|
||||
CHECK(back->empty());
|
||||
}
|
||||
|
||||
// Golden byte-literal (Q-W1 follow-up): pins the EXACT serialized bytes for a
|
||||
// small fixture (two paths), not just self-consistent re-serialization — a
|
||||
// format drift that both writer and reader agree on would slip past the
|
||||
// round-trip tests but not this. The format is frozen as-shipped; the literal
|
||||
// below is the captured current output.
|
||||
static void testSerializeGoldenLiteral() {
|
||||
OwnedFileManifest m;
|
||||
m.add("reasampler_bank/a.wav");
|
||||
m.add("reasampler_bank/b.wav");
|
||||
CHECK(m.serialize() == "{\"owned\":[\"reasampler_bank/a.wav\",\"reasampler_bank/b.wav\"]}");
|
||||
}
|
||||
|
||||
// --- add / contains / order --------------------------------------------------
|
||||
|
||||
static void testAddAndContains() {
|
||||
@@ -159,6 +171,7 @@ static void testMalformedParse() {
|
||||
}
|
||||
|
||||
int main() {
|
||||
testSerializeGoldenLiteral();
|
||||
testEmptyManifest();
|
||||
testAddAndContains();
|
||||
testDedupRepeatedAdds();
|
||||
|
||||
Reference in New Issue
Block a user