diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-16 11:57:16 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-16 11:57:16 +0100 |
commit | 9556bd8ac1374daf01700e18e4a025c02b5d3857 (patch) | |
tree | 06ae86031eb13892e1606d5ffdad4e267abe77bd /test/core/common/VariantReaderTest.cpp | |
parent | 3cca090a650d2e8268977b57aa0dfdb0fb2cae85 (diff) | |
parent | 33a70e7dc2624a674094169dbd234959d5433d81 (diff) |
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test/core/common/VariantReaderTest.cpp')
-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) |