C++: ESP Event wrapper classes

* Provide easy interface to esp_event in C++
* Extended functionality linke synchronous
  waiting for events

* Closes IDF-1048
* Closes IDF-232
This commit is contained in:
Jakob Hasse
2020-03-31 18:52:37 +08:00
parent 303587103a
commit f835bead45
28 changed files with 2088 additions and 17 deletions

View File

@@ -1,9 +1,8 @@
#ifndef UNITY_CXX_H_
#define UNITY_CXX_H_
#pragma once
#include "unity.h"
#define STR(x) #x
#define CXX_UNITY_TYPE_TO_STR(x) #x
/**
* Very simple helper macro to catch exceptions.
@@ -24,12 +23,10 @@
} catch ( std::exception &e) { \
caught_different = true; \
} \
TEST_ASSERT_FALSE_MESSAGE(caught_different, "ERROR: Expected " STR(exception_) \
TEST_ASSERT_FALSE_MESSAGE(caught_different, "ERROR: Expected " CXX_UNITY_TYPE_TO_STR(exception_) \
", but caught different exception."); \
TEST_ASSERT_TRUE_MESSAGE(caught, "ERROR: Expected " STR(exception_) \
TEST_ASSERT_TRUE_MESSAGE(caught, "ERROR: Expected " CXX_UNITY_TYPE_TO_STR(exception_) \
", but no exception thrown."); \
} \
while (0)
#endif // UNITY_CXX_H_