Do not warn about static_asserts.

* tests/sanity/style.test: Filter out static_assert.
This commit is contained in:
Maximilien Colange 2016-12-19 15:36:08 +01:00
parent 6c6660f48f
commit 07a76e4d93

View file

@ -263,7 +263,7 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
e$GREP '(->|[.])size\(\) [=!]= 0|![a-zA-Z0-9_]*(->|[.])size\(\)|(if |while |assert)\([a-zA-Z0-9_]*(->|[.])size\(\)\)' $tmp &&
diag 'Prefer empty() to check emptiness.'
e$GREP 'assert\((0|!".*")\)' $tmp &&
e$GREP 'assert\((0|!".*")\)' $tmp | $GREP -v 'static_assert' &&
diag 'Prefer SPOT_UNREACHABLE or SPOT_UNIMPLEMENTED.'
e$GREP '^[^=*<]*([+][+]|--);' $tmp &&
@ -303,8 +303,8 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
*)
$GREP '#.*include.*priv/' $tmp &&
diag 'Do not include private headers in public headers.'
$GREP -v '#' $tmp | $GREP 'assert[ ]*(.*)' &&
diag 'Use SPOT_ASSERT() instead of assert() in public headers.'
$GREP -v '#' $tmp | $GREP 'assert[ ]*(.*)' | $GREP -v 'static_assert'&&
diag 'Use SPOT_ASSERT() instead of assert() in public headers.'
;;
esac