MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / decode_dflash

Method decode_dflash

server/test/test_server_unit.cpp:2125–2141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2123 TEST_ASSERT(sampler.top_k == 20);
2124 TEST_ASSERT(sampler.seed == 42);
2125 TEST_ASSERT(std::fabs(sampler.pres_pen - 0.3f) < 0.001f);
2126 TEST_ASSERT(std::fabs(sampler.rep_pen - 1.1f) < 0.001f);
2127}
2128
2129TEST_CASE(ServerUnitFixture, test_require_messages_array_rejects_invalid) {
2130 const json valid = {{"messages", json::array({
2131 {{"role", "user"}, {"content", "hi"}},
2132 })}};
2133 TEST_ASSERT(require_messages_array(valid).size() == 1);
2134
2135 const json invalid_bodies[] = {
2136 json::object(), // missing
2137 {{"messages", nullptr}}, // null
2138 {{"messages", "hi"}}, // wrong type
2139 {{"messages", json::array()}}, // empty
2140 };
2141 for (const auto & body : invalid_bodies) {
2142 bool threw = false;
2143 try {
2144 require_messages_array(body);

Callers

nothing calls this directly

Calls 1

emitMethod · 0.80

Tested by

no test coverage detected