summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-01-21 14:28:52 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-01-21 14:28:52 +0000
commita069d0622653332bc12c49b0621988dd5cdb3f79 (patch)
treea36f59660d4abcf82ae1cc56dea4515f5bd02913 /tools
parent2cc41a10148ae042f381ac40dd1a710abbfd87a0 (diff)
downloadmpfr-a069d0622653332bc12c49b0621988dd5cdb3f79.tar.gz
[tools/mpfrlint] Added mpfr_set_(inf|zero) tests on the sign.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9268 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mpfrlint5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/mpfrlint b/tools/mpfrlint
index 144af8e1a..51e1c1c61 100755
--- a/tools/mpfrlint
+++ b/tools/mpfrlint
@@ -108,6 +108,11 @@ do
\"Line \$. of file '$file' has more than 2046 bytes.\n\"" "$file"
done
+# Code style: a sign decimal constant for mpfr_set_inf and mpfr_set_zero
+# should be either 1 or -1 (except for the tests in tset.c).
+grep -E 'mpfr_set_(inf|zero) *\([^,]*, *[-+]?([02-9]|1[^)])' $srctests | \
+ grep -v tests/tset\\.c:
+
# In general, one needs to include mpfr-impl.h (note that some platforms
# such as MS Windows use a config.h, which is included by mpfr-impl.h).
for file in src/*.c