forked from FabioBatSilva/ArduinoFake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
55 lines (44 loc) · 1.06 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// clang-format off
#include <Arduino.h>
#include <cstdlib>
#include <unity.h>
using namespace fakeit;
#include "test_context.h"
#include "test_function.h"
#include "test_print.h"
#include "test_stream.h"
#include "test_serial.h"
#include "test_wire.h"
#include "test_spi.h"
#include "test_eeprom.h"
#include "test_client.h"
#include "test_arduino_string.h"
#include "test_include.h"
#ifdef UNIT_TEST
#define RUN_TEST_GROUP(TEST) \
if (!std::getenv("TEST_GROUP") || (strcmp(#TEST, std::getenv("TEST_GROUP")) == 0)) { \
TEST::run_tests(); \
}
void setUp(void)
{
ArduinoFakeReset();
}
int main(int argc, char **argv)
{
UNITY_BEGIN();
RUN_TEST_GROUP(ArduinoStringTest);
RUN_TEST_GROUP(ArduinoContextTest);
RUN_TEST_GROUP(FunctionTest);
RUN_TEST_GROUP(PrintTest);
RUN_TEST_GROUP(StreamTest);
RUN_TEST_GROUP(SerialTest);
RUN_TEST_GROUP(WireTest);
RUN_TEST_GROUP(SpiTest);
RUN_TEST_GROUP(EEPROMTest);
RUN_TEST_GROUP(ClientTest);
RUN_TEST_GROUP(IncludeTest);
UNITY_END();
return 0;
}
#endif
// clang-format on