mirror of
https://github.com/aydencharles/onionHEN.git
synced 2026-10-22 11:53:07 -05:00
Rename product, namespaces, libraries, paths, and assets from Orion/orion to Onion/onion across the tree. TCP stack-shutdown magic is now ONIO (0x4F4E494F) to match the corrected branding.
22 lines
470 B
C
22 lines
470 B
C
#include "test_harness.h"
|
|
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
|
|
int onion_test_fail(const char *file, int line, const char *fmt, ...) {
|
|
va_list args;
|
|
|
|
fprintf(stderr, " %s:%d: ", file, line);
|
|
va_start(args, fmt);
|
|
vfprintf(stderr, fmt, args);
|
|
va_end(args);
|
|
fputc('\n', stderr);
|
|
return 1;
|
|
}
|
|
|
|
int onion_test_run(const char *name, onion_test_fn_t fn) {
|
|
const int rc = fn();
|
|
fprintf(stderr, "[%s] %s\n", rc == 0 ? "PASS" : "FAIL", name);
|
|
return rc;
|
|
}
|