• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <gtest/gtest.h>
2 #include <math.h>
3 
4 using namespace testing::ext;
5 
6 class MathDremTest : public testing::Test {
SetUp()7     void SetUp() override {}
TearDown()8     void TearDown() override {}
9 };
10 
11 /**
12  * @tc.name: drem_001
13  * @tc.desc: When the parameter of drem is valid, test the return value of the function.
14  * @tc.type: FUNC
15  */
16 HWTEST_F(MathDremTest, drem_001, TestSize.Level1)
17 {
18     EXPECT_DOUBLE_EQ(4.0, drem(15.0, 11.0));
19 }
20 
21 /**
22  * @tc.name: dremf_001
23  * @tc.desc: When the parameter of dremf is valid, test the return value of the function.
24  * @tc.type: FUNC
25  */
26 HWTEST_F(MathDremTest, dremf_001, TestSize.Level1)
27 {
28     EXPECT_FLOAT_EQ(4.0f, dremf(15.0f, 11.0f));
29 }