summaryrefslogtreecommitdiff
path: root/test/core/common/VariantReaderTest.cpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-16 11:57:16 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-16 11:57:16 +0100
commit9556bd8ac1374daf01700e18e4a025c02b5d3857 (patch)
tree06ae86031eb13892e1606d5ffdad4e267abe77bd /test/core/common/VariantReaderTest.cpp
parent3cca090a650d2e8268977b57aa0dfdb0fb2cae85 (diff)
parent33a70e7dc2624a674094169dbd234959d5433d81 (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test/core/common/VariantReaderTest.cpp')
-rw-r--r--test/core/common/VariantReaderTest.cpp12
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)