mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-20 03:52:29 +03:00
libm-test: Properly wrap blocks consisting of several statements.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2013-03-21 Thomas Schwinge <thomas@codesourcery.com>
|
2013-03-21 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* math/gen-libm-test.pl (parse_args, special_functions): Properly
|
||||||
|
wrap blocks consisting of several statements.
|
||||||
|
|
||||||
* sysdeps/generic/math-tests.h: New file.
|
* sysdeps/generic/math-tests.h: New file.
|
||||||
* sysdeps/i386/fpu/math-tests.h: Likewise.
|
* sysdeps/i386/fpu/math-tests.h: Likewise.
|
||||||
* math/test-snan.c: Include it.
|
* math/test-snan.c: Include it.
|
||||||
|
@@ -203,22 +203,24 @@ sub special_functions {
|
|||||||
unless ($args[0] =~ /sincos/) {
|
unless ($args[0] =~ /sincos/) {
|
||||||
die ("Don't know how to handle $args[0] extra.");
|
die ("Don't know how to handle $args[0] extra.");
|
||||||
}
|
}
|
||||||
print $file " FUNC (sincos) ($args[1], &sin_res, &cos_res);\n";
|
print $file " {\n";
|
||||||
|
print $file " FUNC (sincos) ($args[1], &sin_res, &cos_res);\n";
|
||||||
|
|
||||||
$str = 'sincos (' . &beautify ($args[1]) . ', &sin_res, &cos_res)';
|
$str = 'sincos (' . &beautify ($args[1]) . ', &sin_res, &cos_res)';
|
||||||
# handle sin
|
# handle sin
|
||||||
$test = $str . ' puts ' . &beautify ($args[2]) . ' in sin_res';
|
$test = $str . ' puts ' . &beautify ($args[2]) . ' in sin_res';
|
||||||
|
|
||||||
$cline = " check_float (\"$test\", sin_res, $args[2]";
|
$cline = " check_float (\"$test\", sin_res, $args[2]";
|
||||||
$cline .= &new_test ($test, $args[4]);
|
$cline .= &new_test ($test, $args[4]);
|
||||||
print $file $cline;
|
print $file $cline;
|
||||||
|
|
||||||
# handle cos
|
# handle cos
|
||||||
$test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res';
|
$test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res';
|
||||||
$cline = " check_float (\"$test\", cos_res, $args[3]";
|
$cline = " check_float (\"$test\", cos_res, $args[3]";
|
||||||
# only tests once for exception
|
# only tests once for exception
|
||||||
$cline .= &new_test ($test, undef);
|
$cline .= &new_test ($test, undef);
|
||||||
print $file $cline;
|
print $file $cline;
|
||||||
|
print $file " }\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse the arguments to TEST_x_y
|
# Parse the arguments to TEST_x_y
|
||||||
@@ -398,11 +400,15 @@ sub parse_args {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print $file $pre if (defined $pre);
|
if (defined $pre or defined $post) {
|
||||||
|
print $file " {\n";
|
||||||
print $file " $cline";
|
print $file " $pre" if (defined $pre);
|
||||||
|
print $file " $cline";
|
||||||
print $file $post if (defined $post);
|
print $file " $post" if (defined $post);
|
||||||
|
print $file " }\n";
|
||||||
|
} else {
|
||||||
|
print $file " $cline";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate libm-test.c
|
# Generate libm-test.c
|
||||||
|
Reference in New Issue
Block a user