libdgl/TEST/HELPERS.H

27 lines
609 B
C++
Raw Normal View History

2018-04-30 18:23:39 -04:00
#ifndef DGL_TEST_HELPERS_H_INCLUDED
#define DGL_TEST_HELPERS_H_INCLUDED
#include <stdio.h>
#include <assert.h>
#include "dglmath.h"
2018-04-30 18:23:39 -04:00
#define F_EQU(a, b) (close_enough((a), (b), TOLERANCE))
2018-04-30 20:52:43 -04:00
#define FFIX_EQU(a, b) (close_enough((a), (b), 0.05f)) // wow !
2018-04-30 18:23:39 -04:00
extern void _breakpoint();
#pragma aux _breakpoint = "int 0x03";
#define ASSERT(x) \
do { \
if (!(x)) { \
printf("Assertion failed at %s:%d, %s\n", __FILE__, __LINE__, #x); \
_breakpoint(); \
} \
} while (0)
#endif
2018-04-30 20:53:07 -04:00
void clrscr(unsigned char attr);
void gotoxy(int x, int y);