FuncDoodle
Loading...
Searching...
No Matches
Macro.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#define ASSERT(x) \
6 do { \
7 if (x) { \
8 std::cout << "Test for: x:\033[34m pass\033[0m" << std::endl; \
9 } else { \
10 std::cout << "Test for: x:\033[31m fail\033[0m" << std::endl; \
11 } \
12 } while (0)
13
14#define ASSERT_EQ(x, y) \
15 do { \
16 if (x == y) { \
17 std::cout << "Test for: x == y:\033[34m pass\033[0m" << std::endl; \
18 } else { \
19 std::cout << "Test for: x == y:\033[31m fail\033[0m" << std::endl; \
20 } \
21 } while (0)