~akkartik/basic-test

basic-test/x.c -rw-r--r-- 394 bytes View raw
3a8f345c — Kartik Agaram work around sr.ht 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Example usage of the test harness.

#include "test.h"

int main(int argc, char* argv[]) {
  if (argc == 2)
    return run_single_test(argv[1]);
  return run_tests();
}

// no initialization needed before each test
void reset(void) {}

// Example tests.

void test_1(void) {
  CHECK(true);
}

void test_2(void) {
  CHECK(2+2 == 4);
}

// failing test
void test_3(void) {
  CHECK(2+2 == 5);
}