MCPcopy Create free account
hub / github.com/codr7/hacktical-c / error_tests

Function error_tests

error/tests.c:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "error.h"
7
8void error_tests() {
9 void on_catch(struct hc_error *e) {
10 assert(hc_streq("E123", e->message) == 0);
11 }
12
13 hc_catch(on_catch) {
14 hc_throw("E123 Going %s", "Down!");
15 }
16}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected