Add tests for IAMAX with NaN values

This commit is contained in:
Martin Kroeker 2023-08-14 22:28:02 +02:00 committed by GitHub
parent 9402651ef5
commit 3e87ac9a49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -58,3 +58,29 @@ CTEST(amax, damax){
}
#endif
#ifdef BUILD_SINGLE
CTEST(amax, isamax_nan){
blasint N=3, inc=1;
int te_max=0, tr_max=2;
float x[]={1., 0./0., 0./0. };
//float x[]={ 0./0., 2., 3. };
te_max=BLASFUNC(isamax)(&N, x, &inc);
ASSERT_EQUAL(tr_max, te_max);
}
#endif
#ifdef BUILD_DOUBLE
CTEST(amax, idamax_nan){
blasint N=4, inc=1;
int te_max=0, tr_max=1;
//float x[]={1., 0./0., 0./0. };
double x[]={ 0./0., 1.,2. ,3.};
te_max=BLASFUNC(idamax)(&N, x, &inc);
ASSERT_EQUAL(tr_max, te_max);
}
#endif