Remove callback function from autodoc unit test.

It doesn't seem to belong there at all, there is a dedicated callback unit
test for it and it was added to the initial version of autodoc.i back in
124253d698 without any explanation, so just
remove it.

As this callback was used in a PHP test, perform this test for callback.i now
and use "%(uppercase)s" construct inside %callback to test that this works.
This commit is contained in:
Vadim Zeitlin 2015-07-18 16:08:05 +02:00
commit a4b319ce8e
4 changed files with 10 additions and 16 deletions

View file

@ -114,12 +114,6 @@
}
%}
%callback("%(uppercase)s_CALLBACK") func_cb;
%inline {
int func_cb(int c, int d) { return c; }
}
// Bug 3310528
%feature("autodoc","1") banana; // names + types
%inline %{

View file

@ -12,7 +12,7 @@
%callback("%s") A::bar;
%callback("%s") A::foom;
#endif
%callback("%s_Cb_Ptr") foo_T; // this works in Python too
%callback("%(uppercase)s_Cb_Ptr") foo_T; // this works in Python too
%inline %{

View file

@ -1,9 +0,0 @@
<?php
require "tests.php";
require "autodoc.php";
// In 2.0.6 and earlier, the constant was misnamed.
if (gettype(autodoc::FUNC_CB_CALLBACK) !== 'resource') die("autodoc::FUNC_CB_CALLBACK not a resource\n");
check::done();
?>

View file

@ -0,0 +1,9 @@
<?php
require "tests.php";
require "callback.php";
// In 2.0.6 and earlier, the constant was misnamed.
if (gettype(callback::FOO_I_Cb_Ptr) !== 'resource') die("callback::foo_T<int> not a resource\n");
check::done();
?>