diff --git a/Src/Generic/Test/testGeneric.cpp b/Src/Generic/Test/testGeneric.cpp index f528ca01c9..11d263daed 100644 --- a/Src/Generic/Test/testGeneric.cpp +++ b/Src/Generic/Test/testGeneric.cpp @@ -92,8 +92,10 @@ namespace unitpp if (fInjectTeardownAssert || fInjectTeardownAbort) RestorePreviousAssertProc(); +#ifdef DEBUG if (fInjectTeardownAssert) AssertMsg(false, "Injected teardown assert for native test infrastructure validation"); +#endif if (fInjectTeardownAbort) { diff --git a/Src/views/Test/testViews.cpp b/Src/views/Test/testViews.cpp index f6645d9193..40126b3af1 100644 --- a/Src/views/Test/testViews.cpp +++ b/Src/views/Test/testViews.cpp @@ -113,8 +113,10 @@ namespace unitpp if (fInjectTeardownAssert || fInjectTeardownAbort) RestorePreviousAssertProc(); +#ifdef DEBUG if (fInjectTeardownAssert) AssertMsg(false, "Injected teardown assert for native test infrastructure validation"); +#endif if (fInjectTeardownAbort) {