Commit Graph

1 Commits

Author SHA1 Message Date
William S Fulton 65b1e662e3 [Test-suite] Add a common director_langobj test for the language object type
The directorin typemap fixed a couple of commits ago is in the Unified
Typemap Library and so is shared by every language defining SWIG_Object,
but the test for it was written twice, once against PyObject * and once
against VALUE.  Replace python_director_pyobject and ruby_director_value
with director_langobj, written against SWIG_Object in the same spirit as
the existing langobj test, and run it from the common test list so that
every language at least compiles it.

Runme files are added for the four languages that define both
SWIG_Object and SWIG_DIRECTOR_TYPEMAPS, that is the four that generate
director code and were affected: Python, Ruby, Perl and Octave.  Tcl, R
and Scilab define SWIG_Object but have no directors, so they get compile
only coverage.

python_director_pyobject is kept for the Python specific parts that have
no equivalent in the other languages: the swig::SwigPtr_PyObject and
swig::SwigVar_PyObject smart pointers, by value and by const reference,
and a null PyObject * argument.

Assisted-by: Claude Code (Opus 5)
2026-08-01 20:41:20 +01:00