diff options
| author | tyustli <[email protected]> | 2019-06-24 15:59:26 +0800 |
|---|---|---|
| committer | tyustli <[email protected]> | 2019-06-24 15:59:26 +0800 |
| commit | a559179e6fe68a21687e9203ec583bd38b7573e7 (patch) | |
| tree | 40cbba3c161b340c01aa58dbc1ac72fe6aba0552 /components/utilities | |
| parent | c574c49b2fe81ad2ee6f4ba7f3f61c978bea0497 (diff) | |
fix cpp thread class error
Diffstat (limited to 'components/utilities')
| -rw-r--r-- | components/utilities/utest/utest.h | 8 | ||||
| -rw-r--r-- | components/utilities/utest/utest_assert.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/components/utilities/utest/utest.h b/components/utilities/utest/utest.h index 386d177a77..2c91bfe0e1 100644 --- a/components/utilities/utest/utest.h +++ b/components/utilities/utest/utest.h @@ -15,6 +15,10 @@ #include "utest_log.h" #include "utest_assert.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * utest_error * @@ -157,4 +161,8 @@ utest_t utest_handle_get(void); utest_unit_run(test_unit_func, #test_unit_func); \ if(utest_handle_get()->failed_num != 0) return; +#ifdef __cplusplus +} +#endif + #endif /* __UTEST_H__ */ diff --git a/components/utilities/utest/utest_assert.h b/components/utilities/utest/utest_assert.h index 9c620c689d..d83279272e 100644 --- a/components/utilities/utest/utest_assert.h +++ b/components/utilities/utest/utest_assert.h @@ -14,6 +14,10 @@ #include "utest.h" #include <rtthread.h> +#ifdef __cplusplus +extern "C" { +#endif + /* No need for the user to use this function directly */ void utest_assert(int value, const char *file, int line, const char *func, const char *msg); @@ -61,4 +65,8 @@ void utest_assert_buf(const char *a, const char *b, rt_size_t sz, rt_bool_t equa #define uassert_in_range(value, min, max) __utest_assert(((value >= min) && (value <= max)), "(" #value ") not in range("#min","#max")") #define uassert_not_in_range(value, min, max) __utest_assert(!((value >= min) && (value <= max)), "(" #value ") in range("#min","#max")") +#ifdef __cplusplus +} +#endif + #endif /* __UTEST_ASSERT_H__ */ |
