Remove PHP-specific testcase workarounds

The changes on this branch mean these are no longer required.
This commit is contained in:
Olly Betts 2021-04-19 18:50:49 +12:00
parent 8d09b1263b
commit 1bf23edc06
4 changed files with 3 additions and 19 deletions

View File

@ -11,13 +11,6 @@
%newobject *::create();
#ifdef SWIGPHP
// TODO: Currently we do not track the dynamic type of returned objects
// in PHP, so we need the factory helper.
%include factory.i
%factory(Foo *Bar::create, Bar);
#endif
%rename(a) Bar::hello;
%rename(s) Foo::p;
%rename(q) Foo::r;

View File

@ -81,11 +81,7 @@ function mycheck($person, $expected) {
$ret = $baseclass->id();
if ($debug)
print $ret . "\n";
# TODO: Currently we do not track the dynamic type of returned
# objects, so in case it's possible that the dynamic type is not equal
# to the static type, we skip this check.
if (get_parent_class($person) === false)
check::equal($ret, $expected, "#3 failed");
check::equal($ret, $expected, "#3 failed");
$caller->resetCallback();
if ($debug)

View File

@ -38,9 +38,7 @@ class MyFoo3 extends Foo {
# MyFoo.pong().
$ok = 0;
$a = new MyFoo();
# TODO: Currently we do not track the dynamic type of returned
# objects, so we skip the launder() call.
#$b = director_exception::launder($a);
$b = director_exception::launder($a);
$b = $a;
try {
$b->pong();

View File

@ -60,10 +60,7 @@ class C extends FooBar_int {
}
$cc = new C();
# TODO: Currently we do not track the dynamic type of returned
# objects, so we skip the get_self() call.
#$c = Foobar_int::get_self($cc);
$c = $cc;
$c = Foobar_int::get_self($cc);
$c->advance();
check::equal($c->get_name(), "FooBar::get_name hello", "get_name failed");