Skip to content
Permalink
Browse files

Merge pull request #141 from tigercosmos/color-name

chore: fix the typo of the color name, "yellow"
  • Loading branch information...
a127a127 committed Mar 17, 2019
2 parents 8bf3c97 + 6a0f5ed commit 01228701c4a0716ed3218464d8697b8bef0008a6
Showing with 7 additions and 7 deletions.
  1. +7 −7 tools/unittests/StringSwitchTest.cpp
@@ -18,7 +18,7 @@ namespace {
enum Color {
Red,
Blue,
Yello,
Yellow,
Unknown
};

@@ -30,7 +30,7 @@ SKYPAT_F( StringSwitchTest, simple_test)
Color color = StringSwitch<Color>(color_str)
.Case("Red", Red)
.Case("Blue", Blue)
.Case("Yello", Yello)
.Case("Yellow", Yellow)
.Default(Unknown);

ASSERT_TRUE(Red == color);
@@ -41,7 +41,7 @@ SKYPAT_F( StringSwitchTest, default_test) {
Color color = StringSwitch<Color>(color_str)
.Case("Red", Red)
.Case("Blue", Blue)
.Case("Yello", Yello)
.Case("Yellow", Yellow)
.Default(Unknown);

ASSERT_TRUE(Unknown == color);
@@ -53,20 +53,20 @@ SKYPAT_F( StringSwitchTest, start_with_test)
Color color = StringSwitch<Color>(color_str)
.StartsWith("Red", Red)
.StartsWith("Blue", Blue)
.StartsWith("Yello", Yello)
.StartsWith("Yellow", Yellow)
.Default(Unknown);

ASSERT_TRUE(Blue == color);
}

SKYPAT_F( StringSwitchTest, end_with_test)
{
const char* color_str = "TheLightIsYello";
const char* color_str = "TheLightIsYellow";
Color color = StringSwitch<Color>(color_str)
.EndsWith("Red", Red)
.Case("Blue", Blue)
.EndsWith("Yello", Yello)
.EndsWith("Yellow", Yellow)
.Default(Unknown);

ASSERT_TRUE(Yello == color);
ASSERT_TRUE(Yellow == color);
}

0 comments on commit 0122870

Please sign in to comment.
You can’t perform that action at this time.