mirror of
https://github.com/ivabus/pantry
synced 2025-06-08 08:20:32 +03:00
+test gnu.org/gmp (#108)
This commit is contained in:
parent
a5ac760ff4
commit
b67f0350fe
2 changed files with 18 additions and 1 deletions
|
@ -25,4 +25,9 @@ build:
|
|||
make --jobs {{ hw.concurrency }} check
|
||||
make --jobs {{ hw.concurrency }} install
|
||||
|
||||
test: true #FIXME
|
||||
test:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
script: |
|
||||
cc test.c ${{ prefix }}/lib/libgmp.a
|
||||
./a.out
|
||||
|
|
12
projects/gnu.org/gmp/test.c
Normal file
12
projects/gnu.org/gmp/test.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include <gmp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
mpz_t i, j, k;
|
||||
mpz_init_set_str (i, "1a", 16);
|
||||
mpz_init (j);
|
||||
mpz_init (k);
|
||||
mpz_sqrtrem (j, k, i);
|
||||
if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue