Skip to content

Commit 66bbd21

Browse files
committed
fix: comment typos and wrong #undef
1 parent 552654f commit 66bbd21

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tta_assert.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enum tta_AssertReportLevel
3838
ktta_AssertReportLevel_Print = 0, /**< every assertion triggers a callback setup through `tta_AssertSetReportCback` */
3939
ktta_AssertReportLevel_PrintAndBreak = 1, /**< same _Print + assertion triggers a debugbreak when debugger is attached */
4040
ktta_AssertReportLevel_PrintAndThrow = 2, /**< same _Print + assertion calls `throw`/`longjmp` to `catch`/`setjmp` later
41-
mainly to support reusing exciting code with asserts in tests */
41+
mainly to support reusing existing code with asserts in tests */
4242
ktta_AssertReportLevel_ForceInt = 0x3fffffff
4343
};
4444

@@ -89,12 +89,12 @@ TTA_ASSERT_MAY_THROW_API int tta_AssertReport(const char *cond, const char *, in
8989
* @brief The function that could be used to implement testing by re-using existing code containing TTA_ASSERT:
9090
* 1. Just pass the `callback` that executes a code with TTA_ASSERT, and `userdata` for it
9191
* 2. If TTA_ASSERT is triggered by any code executed by `callback` (not necessarily triggered within `callback`
92-
* which assumes arbitrarily nesting), this function returns `1`, otherwise it resturns `0`,
92+
* which assumes arbitrarily nesting), this function returns `1`, otherwise it returns `0`,
9393
* so it's really easy to count failed tests `failed += tta_AssertCallAndCatch(&my_test, my_test_userdata);`
9494
* @note For now, it's not reentrant: any code executed within callback is not allowed to call `tta_AssertCallAndCatch`
9595
* @warning When `TTA_ASSERT_NOEXCEPT` is enabled, this function uses `setjmp`/`longjmp` internally.
9696
* `longjmp` over C++ objects with non-trivial destructors is undefined behavior (C++ $21.10.4, CERT ERR52-CPP).
97-
* Ensure no RAII objects (`std::string`, `std::vectorё, smart pointers, lock guards, etc.) are alive between
97+
* Ensure no RAII objects (`std::string`, `std::vector`, smart pointers, lock guards, etc.) are alive between
9898
* the `TTA_ASSERT` call site and the `tta_AssertCallAndCatch` frame when using `TTA_ASSERT_NOEXCEPT`.
9999
*/
100100
TTA_ASSERT_MAY_THROW_API int tta_AssertCallAndCatch(int (*callback)(void *), void *userdata);
@@ -128,8 +128,8 @@ TTA_ASSERT_MAY_THROW_API int tta_AssertCallAndCatch(int (*callback)(void *), voi
128128
# undef TTA_ASSERT_RET_MSG
129129
#endif
130130

131-
#ifdef TTA_IF_ASSERT
132-
# undef TTA_IF_ASSERT
131+
#ifdef TTA_ASSERT_IF
132+
# undef TTA_ASSERT_IF
133133
#endif
134134

135135
#ifdef TTA_ASSERT_IF_MSG

0 commit comments

Comments
 (0)