refactor: Tidy up SPIT

This commit is contained in:
2025-11-15 20:57:22 +01:00
parent 7aec14cbb9
commit 4a97988227
10 changed files with 828 additions and 1923 deletions
+7 -1
View File
@@ -58,7 +58,13 @@ class SpitClientFix {
.onPlayRemoteObjectStatus = [&](const SType &t, const SObject &o, uint64_t p_FrameInsideObject, int value) { client.onPlayRemoteObjectStatus(t, o, p_FrameInsideObject, value); },
.onCheckSpitTypeVeto = [&](bool knownType, bool createdByClient) { return client.onCheckSpitTypeVeto(knownType, createdByClient); },
.onCheckSpitObjectVeto = [&](bool knownType) { return client.onCheckSpitObjectVeto(knownType); }};
SProcessor sut{"sut", "sutProj", "dev", "##GUID##", callbacks};
SProcessor::InternalCallbacks intCallbacks {
.delay = [&](int ms){ return ; },
.sendMessage = [&](Message::OPPart &msg){ return 0; },
.sendTypeInternal = [&](SType &sType) { return 0; },
.sendObjectInternal = [&](SObject *sObject) { return 0; }
};
SProcessor sut{"sut", "sutProj", "dev", "##GUID##", callbacks, intCallbacks};
};
TEST_CASE_FIXTURE(SpitClientFix, "Spit types") {
@@ -58,7 +58,13 @@ class SpitClientCmplsFix {
.onPlayRemoteObjectStatus = [&](const SType &t, const SObject &o, uint64_t p_FrameInsideObject, int value) { client.onPlayRemoteObjectStatus(t, o, p_FrameInsideObject, value); },
.onCheckSpitTypeVeto = [&](bool knownType, bool createdByClient) { return client.onCheckSpitTypeVeto(knownType, createdByClient); },
.onCheckSpitObjectVeto = [&](bool knownType) { return client.onCheckSpitObjectVeto(knownType); }};
SProcessor sut{"sut", "sutProj", "dev", "##GUID##", callbacks};
SProcessor::InternalCallbacks intCallbacks {
.delay = [&](int ms){ return ; },
.sendMessage = [&](Message::OPPart &msg){ return 0; },
.sendTypeInternal = [&](SType &sType) { return 0; },
.sendObjectInternal = [&](SObject *sObject) { return 0; }
};
SProcessor sut{"sut", "sutProj", "dev", "##GUID##", callbacks, intCallbacks};
};
static void spoofMsgCounter(std::vector<uint8_t> &msg, uint8_t cnt) {