Synth.cpp
 All Data Structures Namespaces Files Functions Variables Macros
tests.cpp
Go to the documentation of this file.
1 #include <stdio.h>
2 #include "tests.h"
3 
4 static int8_t test1(void)
5 {
6  ASSERT((0x100 * 0x200) >> 12 == 0x20);
7  ASSERT((0x1000 * 0x2000) >> 12 == 0x2000);
8  ASSERT((0x1000 * -0x2000) >> 12 == -0x2000);
9  ASSERT((-0x1000 * 0x2000) >> 12 == -0x2000);
10  ASSERT((-0x1000 * -0x2000) >> 12 == 0x2000);
11  return 0;
12 }
13 
14 static int8_t test2(void)
15 {
16  return 0;
17 }
18 
19 static int8_t test3(void)
20 {
21  return 0;
22 }
23 
24 int8_t run_tests(void)
25 {
26  return !(
27  test1() == 0 &&
28  test2() == 0 &&
29  test3() == 0
30  );
31 }
#define ASSERT(cond)
Definition: synth.h:27
static int8_t test1(void)
Definition: tests.cpp:4
static int8_t test2(void)
Definition: tests.cpp:14
int8_t run_tests(void)
Definition: tests.cpp:24
static int8_t test3(void)
Definition: tests.cpp:19