Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix the typo of the color name, "yellow" #141

Merged
merged 1 commit into from Mar 17, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

chore: fix the typo of the color name, "yellow"

  • Loading branch information...
tigercosmos committed Mar 17, 2019
commit 6a0f5edd54ef66fc02e11a9301e204b026e09a38
@@ -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);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.