diff options
Diffstat (limited to 'test/core')
| -rw-r--r-- | test/core/common/VariantReaderTest.cpp | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/test/core/common/VariantReaderTest.cpp b/test/core/common/VariantReaderTest.cpp index a23af09..79e567b 100644 --- a/test/core/common/VariantReaderTest.cpp +++ b/test/core/common/VariantReaderTest.cpp @@ -1153,6 +1153,18 @@ TEST(VariantReader, parseGenericString)  		ASSERT_EQ(0U, loc.getStart());  		ASSERT_EQ(15U, loc.getEnd());  	} + +	// Parse empty string +	{ +		auto res = VariantReader::parseGenericString("", logger); +		ASSERT_TRUE(res.first); +		ASSERT_TRUE(res.second.isString()); +		ASSERT_EQ("", res.second.asString()); + +		SourceLocation loc = res.second.getLocation(); +		ASSERT_EQ(0U, loc.getStart()); +		ASSERT_EQ(0U, loc.getEnd()); +	}  }  TEST(VariantReader, parseGenericComplex)  | 
