Sha256: 6e4ddce852fd1b14abe0b318fb994909e78fa752b443eeccf4c6a5c2815bfd18

Contents?: true

Size: 1.61 KB

Versions: 4

Compression:

Stored size: 1.61 KB

Contents

/* Taken from http://www.jera.com/techinfo/jtns/jtn002.html */

/* Simple Macros for testing */
#define mu_assert_less(message, a, b)                                          \
  do {                                                                         \
    if (a > b) {                                                               \
      scs_printf("%s: %1.3e > %1.3e\n", message, a, b);                        \
      return message;                                                          \
    }                                                                          \
  } while (0)

#define mu_assert(message, test)                                               \
  do {                                                                         \
    if (!(test))                                                               \
      return message;                                                          \
  } while (0)

#define mu_run_test(test) _mu_run_test(#test, test)

#define _mu_run_test(name, test)                                               \
  do {                                                                         \
    scs_printf("*********************************************************\n"); \
    scs_printf("Running test: %s\n", name);                                    \
    const char *message = test();                                              \
    tests_run++;                                                               \
    if (message)                                                               \
      return message;                                                          \
  } while (0)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
scs-0.5.0 vendor/scs/test/minunit.h
scs-0.4.3 vendor/scs/test/minunit.h
scs-0.4.2 vendor/scs/test/minunit.h
scs-0.4.1 vendor/scs/test/minunit.h