Fix variant_subtract test case after PR #2095

This commit is contained in:
mrossinek 2019-01-02 16:32:16 +01:00
parent 6fcbe2efbd
commit fc3b336f1a
No known key found for this signature in database
GPG key ID: 454148C1EEA3C435

View file

@ -139,9 +139,10 @@ int main (int, char**)
try {Variant v32 = v3 - v2; t.fail ("foo - 3.14 --> error");} try {Variant v32 = v3 - v2; t.fail ("foo - 3.14 --> error");}
catch (...) {t.pass ("foo - 3.14 --> error");} catch (...) {t.pass ("foo - 3.14 --> error");}
// string - string -> ERROR // string - string -> concatenated string
try {Variant v33 = v3 - v3; t.fail ("foo - foo --> error");} Variant v33 = v3 - v3;
catch (...) {t.pass ("foo - foo --> error");} t.is (v33.type (), Variant::type_string, "foo - foo --> string");
t.is (v33.get_string (), "foo-foo", "foo - foo --> foo-foo");
// string - date -> ERROR // string - date -> ERROR
try {Variant v34 = v3 - v4; t.fail ("foo - 1234567890 --> error");} try {Variant v34 = v3 - v4; t.fail ("foo - 1234567890 --> error");}