ChaiScript/unittests/user_defined_conversions_2.chai
2014-11-02 14:08:57 -07:00

11 lines
279 B
ChaiScript

load_module("test_module")
auto t := TestBaseType();
// This uses the TestBaseType to Type2 user type
// conversion which was added in the module and then calls
// "get_val()" which exists on the Type2 type
assert_equal(t.get_val(), 10);
assert_equal(t.get_str().size(), 11);