1 #include <gtest/gtest.h> 2 #include <math.h> 3 4 using namespace testing::ext; 5 6 class MathJ1Test : public testing::Test { SetUp()7 void SetUp() override {} TearDown()8 void TearDown() override {} 9 }; 10 11 /** 12 * @tc.name: j1_001 13 * @tc.desc: When the input parameters are valid, test the return value of this function. 14 * @tc.type: FUNC 15 */ 16 HWTEST_F(MathJ1Test, j1_001, TestSize.Level1) 17 { 18 EXPECT_DOUBLE_EQ(0.0, j1(0.0)); 19 EXPECT_DOUBLE_EQ(0.44005058574493355, j1(1.0)); 20 } 21 22 /** 23 * @tc.name: j1f_001 24 * @tc.desc: When the input parameter is of float type and valid, test the return value of this function. 25 * @tc.type: FUNC 26 */ 27 HWTEST_F(MathJ1Test, j1f_001, TestSize.Level1) 28 { 29 EXPECT_FLOAT_EQ(0.0f, j1f(0.0f)); 30 EXPECT_FLOAT_EQ(0.44005057f, j1f(1.0f)); 31 }