summaryrefslogtreecommitdiff
path: root/test/core/common/VariantReaderTest.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-16 20:47:07 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-16 20:47:07 +0100
commit4a4e2245730ead7fce354469fe626398520f12b2 (patch)
treeaf42dbf2fd9ea87884cd500367c4017293609863 /test/core/common/VariantReaderTest.cpp
parent6de2c8ad9450a8b349161d37ad7cab538324034d (diff)
parent75eea3bdd846a34c69be3d09f41ff4fae706628e (diff)
using remote version of simple_book.osml
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)