Skip to content

Commit

Permalink
[Unittest] Fix linear lr scheduler's unittest name
Browse files Browse the repository at this point in the history
Fix linear lr schduler's unit test names
- Change test cases name to *_n if it's a positive test case

**evaluation**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: lhw414 <[email protected]>
  • Loading branch information
lhw414 authored and jijoongmoon committed Nov 15, 2024
1 parent f939c88 commit a80a6e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/unittest/unittest_nntrainer_lr_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,23 +490,23 @@ TEST(lr_linear, prop_02_n) {
EXPECT_THROW(lr->setProperty({"learning_rate:0.1"}), std::invalid_argument);
}

TEST(lr_linear, prop_03_n) {
TEST(lr_linear, prop_03_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"max_learning_rate=1.0"}));
}

TEST(lr_linear, prop_04_n) {
TEST(lr_linear, prop_04_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"min_learning_rate=0.1"}));
}

TEST(lr_linear, prop_05_n) {
TEST(lr_linear, prop_05_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"max_learning_rate=1.0"}));
EXPECT_NO_THROW(lr->setProperty({"min_learning_rate=0.1"}));
}

TEST(lr_linear, prop_06_n) {
TEST(lr_linear, prop_06_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"decay_steps=5"}));
}
Expand All @@ -516,15 +516,15 @@ TEST(lr_linear, finalize_01_n) {
EXPECT_THROW(lr->finalize(), std::invalid_argument);
}

TEST(lr_linear, finalize_02_n) {
TEST(lr_linear, finalize_02_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"max_learning_rate=1.0"}));
EXPECT_NO_THROW(lr->setProperty({"min_learning_rate=0.1"}));
EXPECT_NO_THROW(lr->setProperty({"decay_steps=10"}));
EXPECT_NO_THROW(lr->finalize());
}

TEST(lr_linear, getlearningrate_01_n) {
TEST(lr_linear, getlearningrate_01_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"max_learning_rate=1.0"}));
EXPECT_NO_THROW(lr->setProperty({"min_learning_rate=0.1"}));
Expand All @@ -533,7 +533,7 @@ TEST(lr_linear, getlearningrate_01_n) {
EXPECT_FLOAT_EQ(lr->getLearningRate(0), 1);
}

TEST(lr_linear, getlearningrate_02_n) {
TEST(lr_linear, getlearningrate_02_p) {
auto lr = createLRS("linear");
EXPECT_NO_THROW(lr->setProperty({"max_learning_rate=1.0"}));
EXPECT_NO_THROW(lr->setProperty({"min_learning_rate=0.1"}));
Expand Down

0 comments on commit a80a6e1

Please sign in to comment.