%description: Tests if wrong (illegal) parameter values are detected by the distributions. %activity: #define TEST_ERROR(f) \ try {EV << #f << ": "; f; EV << "no error\n";} catch (std::exception& e) {EV << e.what() << endl;} TEST_ERROR(gamma_d(0,1)); TEST_ERROR(gamma_d(1,0)); TEST_ERROR(gamma_d(-1,-1)); TEST_ERROR(beta(0,1)); TEST_ERROR(beta(1,0)); TEST_ERROR(beta(-1,-1)); TEST_ERROR(cauchy(-1,-1)); TEST_ERROR(cauchy(-1,0)); TEST_ERROR(cauchy(-1,1)); TEST_ERROR(cauchy(1,1)); TEST_ERROR(triang(0,0,0)); TEST_ERROR(triang(0,0,1)); TEST_ERROR(triang(0,1,1)); TEST_ERROR(triang(0,1,2)); TEST_ERROR(weibull(1,1)); TEST_ERROR(weibull(0,1)); TEST_ERROR(weibull(1,0)); /* TEST_ERROR(hypergeometric(0,1,1)); TEST_ERROR(hypergeometric(1,0,1)); TEST_ERROR(hypergeometric(2,3,6)); TEST_ERROR(hypergeometric(2,3,5)); TEST_ERROR(hypergeometric(-1,3,5)); TEST_ERROR(hypergeometric(2,-1,5)); TEST_ERROR(hypergeometric(2,3,-1)); */ %contains: stdout gamma_d(0,1): gamma(): Wrong parameters alpha=0, theta=1: Both must be positive gamma_d(1,0): gamma(): Wrong parameters alpha=1, theta=0: Both must be positive gamma_d(-1,-1): gamma(): Wrong parameters alpha=-1, theta=-1: Both must be positive beta(0,1): beta(): Wrong parameters alpha1=0, alpha2=1: Both must be positive beta(1,0): beta(): Wrong parameters alpha1=1, alpha2=0: Both must be positive beta(-1,-1): beta(): Wrong parameters alpha1=-1, alpha2=-1: Both must be positive cauchy(-1,-1): cauchy(): Wrong parameters a=-1, b=-1: b>0 expected cauchy(-1,0): cauchy(): Wrong parameters a=-1, b=0: b>0 expected cauchy(-1,1): no error cauchy(1,1): no error triang(0,0,0): triang(): Wrong parameters a=0, b=0, c=0: a<=b<=c, a