diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-12-10 02:41:23 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-12-10 02:41:23 +0100 |
commit | a8f78252f05327d37aec3b853109b6d1359af452 (patch) | |
tree | 1eb136057bc59c6cf19ac52d2830c5a186149ce8 /test/core/variant | |
parent | d84efdc312a9c5d0b6757c826810809a8e78f1e2 (diff) | |
parent | 325d78169620094178513303d65c71d933182ae4 (diff) |
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test/core/variant')
-rw-r--r-- | test/core/variant/VariantTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/core/variant/VariantTest.cpp b/test/core/variant/VariantTest.cpp index 270c350..e51cf36 100644 --- a/test/core/variant/VariantTest.cpp +++ b/test/core/variant/VariantTest.cpp @@ -121,6 +121,21 @@ TEST(Variant, mapValue) ASSERT_EQ(2, v2.asMap().find("key1")->second.asArray()[1].asInt()); } +TEST(Variant, relationalOperators){ + Variant a{4}; + Variant b{4}; + + ASSERT_EQ(a,b); + + b.setInt(5); + ASSERT_TRUE(a < b); + + b.setDouble(4); + ASSERT_FALSE(a == b); + + a.setDouble(4); + ASSERT_EQ(a,b); +} } |