diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-24 16:00:56 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-24 16:01:22 +0200 |
commit | 46dbd9455c37223932e9427da3c0217f5dcdec41 (patch) | |
tree | 0acee3d117fc71821b82f730b9a7f63b3da778c4 /tests/testhelpermodule.c | |
parent | cc3157c279dea92767a55ff61faaa8d450976c97 (diff) | |
download | pygobject-46dbd9455c37223932e9427da3c0217f5dcdec41.tar.gz |
Add tests for pyg_constant_strip_prefix()
Diffstat (limited to 'tests/testhelpermodule.c')
-rw-r--r-- | tests/testhelpermodule.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c index 9fc4fc6f..638727b2 100644 --- a/tests/testhelpermodule.c +++ b/tests/testhelpermodule.c @@ -526,6 +526,19 @@ _wrap_test_value_array(PyObject *self, PyObject *args) } static PyObject * +_wrap_constant_strip_prefix(PyObject *self, PyObject *args) +{ + const char *name, *strip_prefix; + const gchar *result; + + if (!PyArg_ParseTuple (args, "ss", &name, &strip_prefix)) + return NULL; + + result = pyg_constant_strip_prefix (name, strip_prefix); + return PYGLIB_PyUnicode_FromString (result); +} + +static PyObject * _wrap_test_gerror_exception(PyObject *self, PyObject *args) { PyObject *py_method; @@ -642,6 +655,7 @@ static PyMethodDef testhelper_functions[] = { { "connectcallbacks", (PyCFunction)_wrap_connectcallbacks, METH_VARARGS }, { "test_value", (PyCFunction)_wrap_test_value, METH_VARARGS }, { "test_value_array", (PyCFunction)_wrap_test_value_array, METH_VARARGS }, + { "constant_strip_prefix", (PyCFunction)_wrap_constant_strip_prefix, METH_VARARGS }, { "test_gerror_exception", (PyCFunction)_wrap_test_gerror_exception, METH_VARARGS }, { "owned_by_library_get_instance_list", (PyCFunction)_wrap_test_owned_by_library_get_instance_list, METH_NOARGS }, { "floating_and_sunk_get_instance_list", (PyCFunction)_wrap_test_floating_and_sunk_get_instance_list, METH_NOARGS }, |