feat: Add workflow to check config description (#1894)

fixes #1880

---------

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
Co-authored-by: Alex Kremer <akremer@ripple.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
This commit is contained in:
Peter Chen
2025-03-04 10:47:36 -05:00
committed by GitHub
parent f0613c945f
commit 86e2cd1cc4
5 changed files with 521 additions and 8 deletions

View File

@@ -61,6 +61,14 @@ TEST_F(ConfigValueTest, defaultValue)
EXPECT_EQ(cv.type(), ConfigType::Integer);
}
TEST_F(ConfigValueTest, defaultValueWithDescription)
{
auto const cv = ConfigValue{ConfigType::String}.defaultValue("123", "random description");
EXPECT_TRUE(cv.hasValue());
EXPECT_FALSE(cv.isOptional());
EXPECT_EQ(cv.type(), ConfigType::String);
}
TEST_F(ConfigValueDeathTest, invalidDefaultValue)
{
EXPECT_DEATH({ [[maybe_unused]] auto const a = ConfigValue{ConfigType::String}.defaultValue(33); }, ".*");