/* * sprch_conformance.h — the sprch_handler conformance suite (canonical copy). * * Copy include/sprch_conformance.h + src/sprch_conformance.c verbatim into every * handler repo, next to sprch.h. Depends only on sprch.h, scorpiox-io.h and the * vendored yyjson. A handler repo gates `make test` on * * sprch_conformance_run(sprch_get(), &recorded_fixture_io, settings, entry, config, * report, sizeof report) == 0 * * `io` must be a WORKING transport for the positive checks (a recorded-fixture * fake, never the network in --test). The suite brings its own broken * transports (connection refused, 401, 503, garbage body) for the negative ones. * `entry_json` / `config_json` may be NULL when the handler lacks STREAM / * DOWNLOAD. Returns the number of failed checks (0 = pass); a line per check, * "PASS ..." / "FAIL ..." / "SKIP ...", is written to report. */ #ifndef SPRCH_CONFORMANCE_H #define SPRCH_CONFORMANCE_H #include #include "sprch.h" #ifdef __cplusplus extern "C" { #endif int sprch_conformance_run(const sprch_handler *h, const scorpiox_io *io, const char *settings_json, const char *entry_json, const char *config_json, char *report, size_t report_cap); /* the RuntimeType strings the suite accepts (== the registry inventory) */ int sprch_conformance_known_count(void); const char *sprch_conformance_known(int i); #ifdef __cplusplus } #endif #endif