Permalink
Browse files

testsuite/script interface: Add value mirrr test

  • Loading branch information...
RudolfWeeber committed Dec 4, 2018
1 parent d903acc commit 4256d1ff4f0bd08c680550dfd8f91bab154faaaa
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/script_interface/VariantTester.hpp
  2. +4 −0 testsuite/python/variant_conversion.py
@@ -93,6 +93,10 @@ class VariantTester : public ScriptInterfaceBase {
return is_vector(par.at("value"));
}
}
if (method == "mirror") {
return par.at("value");
}
throw std::runtime_error("Unknown method");
}
@@ -46,6 +46,10 @@ def test_bool_return(self):
self.assertTrue(self.vt.call_method("true"))
self.assertFalse(self.vt.call_method("false"))
def test_mirror(self):
for v in 1.1, 0.6, 0.1232, 1, [1, 1.1], "blabla":
self.assertEqual(v, self.vt.call_method("mirror", value=v))
def test_default(self):
""" Check that a default constructed Variant translates to None.
"""

0 comments on commit 4256d1f

Please sign in to comment.