this.suite = new GLib.TestSuite (name);
}
- public void add_test (string name, TestMethod test) {
- var adaptor = new Adaptor (name, test, this);
+ public void add_test (string name, owned TestMethod test) {
+ var adaptor = new Adaptor (name, (owned)test, this);
this.adaptors += adaptor;
this.suite.add (new GLib.TestCase (adaptor.name,
private TestCase test_case;
public Adaptor (string name,
- TestMethod test,
+ owned TestMethod test,
TestCase test_case) {
this.name = name;
- this.test = test;
+ this.test = (owned)test;
this.test_case = test_case;
}
assert (test_collection.add ("two"));
assert (test_collection.add ("three"));
- bool one = false;
- bool two = false;
- bool three = false;
-
var iter = test_collection.iterator().chop (1, 1);
assert (!iter.valid);
var iter2 = test_collection.iterator();