Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ak0327 committed Aug 24, 2023
1 parent c885b91 commit 88abbb7
Showing 1 changed file with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,46 @@
// EXPECT_EQ(3, func(3));
// }

TEST(TEST_get_valid_config_file_path, simple_test1) {
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.conf"));
}

TEST(TEST_get_valid_config_file_path, simple_test2) {
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.CONF", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.CONF"));
}
TEST(TEST_get_valid_config_file_path, simple_test3) {
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.Conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.Conf"));
}
TEST(TEST_get_valid_config_file_path, simple_test4) {
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.conF", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.conF"));
}
TEST(TEST_get_valid_config_file_path, simple_test5) {
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/a.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.conf"));
}
TEST(TEST_get_valid_config_file_path, simple_test6) {
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/a.b.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.b.conf"));
}


TEST(TEST_get_valid_config_file_path, simple_test) {
// EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.conf"));
// EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.CONF", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.CONF"));
// EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.Conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.Conf"));
// EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.conF", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.conF"));
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.conf"));
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.CONF", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.CONF"));
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.Conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.Conf"));
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/file.conF", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file.conF"));

EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/file"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/nothing.conf"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/nothing"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/.conf"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/conf"));

// EXPECT_EQ("../test/unit_test/is_valid_file_path/files/a.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.conf"));
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/a.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.conf"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/ a.conf"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.conf "));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/ a.conf "));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/X.conf"));

// EXPECT_EQ("../test/unit_test/is_valid_file_path/files/a.b.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.b.conf"));
EXPECT_EQ("../test/unit_test/is_valid_file_path/files/a.b.conf", get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.b.conf"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/a.conf.b"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/conf.a"));
EXPECT_ANY_THROW(get_valid_config_file_path((char *)"../test/unit_test/is_valid_file_path/files/conf.a."));
Expand Down

0 comments on commit 88abbb7

Please sign in to comment.