Wrap up method_missing docs and tests
This commit is contained in:
@@ -22,12 +22,6 @@ assert_true(o.f3(4) == 60);
|
||||
|
||||
assert_true(o.mult(3.0) == 45.0);
|
||||
|
||||
def method_missing(int i, string method_name, x, y) {
|
||||
"method_missing called : " + to_string(i) + "." + method_name + "(" + to_string(x) + ", " + to_string(y) + ")";
|
||||
}
|
||||
|
||||
|
||||
assert_true(5.bob(3,4) == "method_missing called : 5.bob(3, 4)" )
|
||||
|
||||
var o2 = Dynamic_Object();
|
||||
o2.a = 15
|
||||
|
7
unittests/method_missing.chai
Normal file
7
unittests/method_missing.chai
Normal file
@@ -0,0 +1,7 @@
|
||||
def method_missing(int i, string method_name, Vector params) {
|
||||
"method_missing called : " + to_string(i) + "." + method_name + "(" + to_string(params[0]) + ", " + to_string(params[1]) + ")";
|
||||
}
|
||||
|
||||
|
||||
assert_true(5.bob(3,4) == "method_missing called : 5.bob(3, 4)" )
|
||||
|
Reference in New Issue
Block a user