// Tests the GetSetullRejectionCoeff functions TEST(Classifier, GetSetullRejectionCoeff) { Classifier classifier; { const Float nullRejectionCoeff = 2.0; EXPECT_TRUE( classifier.setNullRejectionCoeff(nullRejectionCoeff) ); EXPECT_TRUE( classifier.getNullRejectionCoeff() == nullRejectionCoeff ); } { const Float nullRejectionCoeff = 5.0; EXPECT_TRUE( classifier.setNullRejectionCoeff(nullRejectionCoeff) ); EXPECT_TRUE( classifier.getNullRejectionCoeff() == nullRejectionCoeff ); EXPECT_FALSE( classifier.setNullRejectionCoeff(0.0) ); //This should fail, as the null rejection coeff should be greater than zero EXPECT_FALSE( classifier.setNullRejectionCoeff(-2.0) ); //This should fail, as the null rejection coeff should be greater than zero EXPECT_TRUE( classifier.getNullRejectionCoeff() == nullRejectionCoeff ); } }