Files
Chimera GFX release export a6037502d7
phase0-ci / build-and-audit (push) Successful in 2m14s
Publish Chimera GFX source
2026-09-03 03:27:14 +02:00

28 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-3.0-or-later */
#include "firmware_gate.h"
#include <stdio.h>
static int failures;
#define CHECK(expression) \
do { \
if (!(expression)) { \
(void)fprintf(stderr, "%s:%d: check failed: %s\n", __FILE__, \
__LINE__, #expression); \
failures += 1; \
} \
} while (0)
int main(void) {
CHECK(chimera_gfx_firmware_gate_allows("NONE", "NONE") == 0);
CHECK(chimera_gfx_firmware_gate_allows("NONE", "13.40") == 0);
CHECK(chimera_gfx_firmware_gate_allows("13.40", "13.40") == 1);
CHECK(chimera_gfx_firmware_gate_allows("13.40", "13.4") == 0);
CHECK(chimera_gfx_firmware_gate_allows("", "") == 0);
CHECK(chimera_gfx_firmware_gate_allows("13.40", "") == 0);
CHECK(chimera_gfx_firmware_gate_allows(NULL, "13.40") == 0);
CHECK(chimera_gfx_firmware_gate_allows("13.40", NULL) == 0);
return failures == 0 ? 0 : 1;
}