diff options
Diffstat (limited to 'test/core')
| -rw-r--r-- | test/core/common/ArgumentTest.cpp | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/test/core/common/ArgumentTest.cpp b/test/core/common/ArgumentTest.cpp index c8ecd2f..85f99a1 100644 --- a/test/core/common/ArgumentTest.cpp +++ b/test/core/common/ArgumentTest.cpp @@ -881,5 +881,23 @@ TEST(Arguments, validateMap)  		          map);  	}  } + +TEST(Arguments, validateMissing) +{ +	Arguments args{Argument::String("a")}; + +	{ +		Variant::mapType map{}; +		ASSERT_FALSE(args.validateMap(map, logger, false)); +		ASSERT_EQ(Variant::mapType({{"a", ""}}), map); +	} + +	{ +		Variant::arrayType arr{}; +		ASSERT_FALSE(args.validateArray(arr, logger)); +		ASSERT_EQ(Variant::arrayType({""}), arr); +	} +} +  }  | 
