aboutsummaryrefslogtreecommitdiff
path: root/testing.h
blob: cb4029428d3ef353b2d5c35cf90f4f94cab321dc (plain) (blame)
1
2
3
4
5
6
7

#include <stdio.h>

#define t_assert(fact)                                                         \
  if (!(fact)) {                                                               \
    fprintf(stderr, "Assertion failed: %s at %s:%d in %s()\n",  #fact, __FILE__, __LINE__, __func__); \
    return 1;                                                                  \
  }