mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
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:
@@ -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_
|
||||
|
Reference in New Issue
Block a user