diff options
author | Hood Chatham <hood@mit.edu> | 2021-07-16 14:33:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 10:33:04 -0400 |
commit | eb2447249540ca568b0b464f6107501dcc0f65ab (patch) | |
tree | c0a1a6a7e4c73ab28a8c06a453bd2b6cff0392da /testsuite/libffi.closures/cls_multi_sshort.c | |
parent | a541fc600f4418441f91073a0834ea47b0989de9 (diff) | |
download | libffi-eb2447249540ca568b0b464f6107501dcc0f65ab.tar.gz |
Use CHECK to assert more things in test suite (#654)
* Use CHECK to assert more things in test suite
* Use snprintf instead of sprintf
* Fix va_struct1 and va_struct3
Diffstat (limited to 'testsuite/libffi.closures/cls_multi_sshort.c')
-rw-r--r-- | testsuite/libffi.closures/cls_multi_sshort.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/libffi.closures/cls_multi_sshort.c b/testsuite/libffi.closures/cls_multi_sshort.c index 467146d..d78c62d 100644 --- a/testsuite/libffi.closures/cls_multi_sshort.c +++ b/testsuite/libffi.closures/cls_multi_sshort.c @@ -14,6 +14,9 @@ static signed short test_func_fn(signed short a1, signed short a2) result = a1 + a2; printf("%d %d: %d\n", a1, a2, result); + CHECK(a1 == 2); + CHECK(a2 == 32765); + CHECK(result == 32767); return result; @@ -62,6 +65,7 @@ int main (void) /* { dg-output "2 32765: 32767" } */ printf("res: %d\n", (unsigned short)res_call); /* { dg-output "\nres: 32767" } */ + CHECK(res_call == 32767); CHECK(ffi_prep_closure_loc(pcl, &cif, test_func_gn, NULL, code) == FFI_OK); @@ -69,6 +73,7 @@ int main (void) /* { dg-output "\n2 32765: 32767" } */ printf("res: %d\n", res_closure); /* { dg-output "\nres: 32767" } */ + CHECK(res_closure == 32767); exit(0); } |