Filter out static_assert from Posix assert test
parent
769643bbe1
commit
07c208dbc6
|
|
@ -1054,15 +1054,15 @@ if true; then
|
||||||
TEST_LIST+=("No Posix NDEBUG or assert")
|
TEST_LIST+=("No Posix NDEBUG or assert")
|
||||||
FAILED=0
|
FAILED=0
|
||||||
|
|
||||||
# Filter out C++ and Doxygen comments.
|
# Search for headers. Filter out C++ abd Doxygen comments.
|
||||||
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v '//' | "$GREP" -c -E '(assert.h|cassert)')
|
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v '//' | "$GREP" -c -E '(assert.h|cassert)')
|
||||||
if [[ "$COUNT" -ne "0" ]]; then
|
if [[ "$COUNT" -ne "0" ]]; then
|
||||||
FAILED=1
|
FAILED=1
|
||||||
echo "FAILED: found Posix assert headers" | tee -a "$TEST_RESULTS"
|
echo "FAILED: found Posix assert headers" | tee -a "$TEST_RESULTS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Filter out C++ and Doxygen comments.
|
# Search for asserts. Filter out C++, Doxygen comments and static_assert.
|
||||||
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v '//' | "$GREP" -c -E 'assert[[:space:]]*\(')
|
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v -E '//|_assert' | "$GREP" -c -E 'assert[[:space:]]*\(')
|
||||||
if [[ "$COUNT" -ne "0" ]]; then
|
if [[ "$COUNT" -ne "0" ]]; then
|
||||||
FAILED=1
|
FAILED=1
|
||||||
echo "FAILED: found use of Posix assert" | tee -a "$TEST_RESULTS"
|
echo "FAILED: found use of Posix assert" | tee -a "$TEST_RESULTS"
|
||||||
|
|
|
||||||
|
|
@ -1054,15 +1054,15 @@ if true; then
|
||||||
TEST_LIST+=("No Posix NDEBUG or assert")
|
TEST_LIST+=("No Posix NDEBUG or assert")
|
||||||
FAILED=0
|
FAILED=0
|
||||||
|
|
||||||
# Filter out C++ and Doxygen comments.
|
# Search for headers. Filter out C++ abd Doxygen comments.
|
||||||
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v '//' | "$GREP" -c -E '(assert.h|cassert)')
|
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v '//' | "$GREP" -c -E '(assert.h|cassert)')
|
||||||
if [[ "$COUNT" -ne "0" ]]; then
|
if [[ "$COUNT" -ne "0" ]]; then
|
||||||
FAILED=1
|
FAILED=1
|
||||||
echo "FAILED: found Posix assert headers" | tee -a "$TEST_RESULTS"
|
echo "FAILED: found Posix assert headers" | tee -a "$TEST_RESULTS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Filter out C++ and Doxygen comments.
|
# Search for asserts. Filter out C++, Doxygen comments and static_assert.
|
||||||
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v '//' | "$GREP" -c -E 'assert[[:space:]]*\(')
|
COUNT=$(cat ./*.h ./*.cpp | "$GREP" -v -E '//|_assert' | "$GREP" -c -E 'assert[[:space:]]*\(')
|
||||||
if [[ "$COUNT" -ne "0" ]]; then
|
if [[ "$COUNT" -ne "0" ]]; then
|
||||||
FAILED=1
|
FAILED=1
|
||||||
echo "FAILED: found use of Posix assert" | tee -a "$TEST_RESULTS"
|
echo "FAILED: found use of Posix assert" | tee -a "$TEST_RESULTS"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue