mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
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:
@@ -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); }, ".*");
|
||||
|
||||
Reference in New Issue
Block a user