Skip to content

Commit

Permalink
Fix EllInt test on gsl 1.x (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Nov 19, 2015
1 parent 8fd98ea commit f34afb3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/gsl-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -822,14 +822,22 @@ TEST_F(GSLTest, Dilog) {
TEST_EFUNC2(gsl_sf_dilog, DilogFunctionInfo());
}

int ellint_D(double phi, double k, gsl_mode_t mode, gsl_sf_result *result) {
#if GSL_MAJOR_VERSION >= 2
return gsl_sf_ellint_D_e(phi, k, mode, result);
#else
return gsl_sf_ellint_D_e(phi, k, 0, mode, result);
#endif
}

TEST_F(GSLTest, EllInt) {
TEST_EFUNC(gsl_sf_ellint_Kcomp);
TEST_EFUNC(gsl_sf_ellint_Ecomp);
TEST_EFUNC(gsl_sf_ellint_Pcomp);
TEST_EFUNC(gsl_sf_ellint_F);
TEST_EFUNC(gsl_sf_ellint_E);
TEST_EFUNC2(gsl_sf_ellint_P, NoDeriv());
TEST_EFUNC2(gsl_sf_ellint_D, NoDeriv());
TestFunc(GetFunction("gsl_sf_ellint_D", NoDeriv()), ellint_D);
TEST_EFUNC2(gsl_sf_ellint_RC, NoDeriv());
TEST_EFUNC2(gsl_sf_ellint_RD, NoDeriv());
TEST_EFUNC2(gsl_sf_ellint_RF, NoDeriv());
Expand Down

0 comments on commit f34afb3

Please sign in to comment.