* tests/link-order2.at: Simplify logic to be a bit more self

documenting.  Suggested by Gary V. Vaughan.
This commit is contained in:
Ralf Wildenhues 2006-11-07 17:53:22 +00:00
parent 84748dd914
commit a22d0bd7ff
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2006-11-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/link-order2.at: Simplify logic to be a bit more self
documenting. Suggested by Gary V. Vaughan.
2006-10-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/link-order2.at: Add missing $bindir setting. Prevent

View File

@ -41,18 +41,21 @@ EOF
cat >main.c <<\EOF
#include <math.h>
#include <stdlib.h>
extern double b (double);
extern double four;
double four = 4.0;
int main (void)
{
/* The ! is to invert C true to shell true
* The function b should call our sin (that returns 0) and not libm's
/* The function b should call our sin (that returns 0) and not libm's
* (in the latter case, b returns approximately 1)
* the sqrt is to force linking against libm
* the variable four is to prevent most compiler optimizations
*/
return !( fabs (b (3.1415 / 2.)) < 0.01 && fabs (sqrt (four) - 2.) < 0.01 );
int status = EXIT_FAILURE;
if (fabs (b (3.1415 / 2.)) < 0.01 && fabs (sqrt (four) - 2.) < 0.01)
status = EXIT_SUCCESS;
return status;
}
EOF