forked from AuroraMiddleware/gtk
Add an introspection api test
Every beginning is small... just check one constant for now.
This commit is contained in:
parent
c8eeb46aa5
commit
6a24e0c7c3
@ -733,6 +733,8 @@ int main () {
|
||||
endif
|
||||
endif
|
||||
|
||||
project_build_root = meson.current_build_dir()
|
||||
|
||||
subdir('gtk/css')
|
||||
subdir('gdk')
|
||||
subdir('gsk')
|
||||
|
10
testsuite/introspection/api.py
Executable file
10
testsuite/introspection/api.py
Executable file
@ -0,0 +1,10 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import gi
|
||||
|
||||
gi.require_version('Gtk', '4.0')
|
||||
|
||||
from gi.repository import Gtk
|
||||
|
||||
assert isinstance(Gtk.INVALID_LIST_POSITION, int), 'Gtk.INVALID_LIST_POSITION is not an int'
|
8
testsuite/introspection/meson.build
Normal file
8
testsuite/introspection/meson.build
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
test('api',
|
||||
find_program('api.py', dirs: meson.current_source_dir()),
|
||||
suite: ['introspection'],
|
||||
env: [
|
||||
'GI_TYPELIB_PATH=@0@/gtk:/usr/lib64/girepository-1.0'.format(project_build_root),
|
||||
'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root),
|
||||
])
|
@ -56,3 +56,7 @@ subdir('css')
|
||||
subdir('a11y')
|
||||
subdir('tools')
|
||||
subdir('reftests')
|
||||
|
||||
if build_gir
|
||||
subdir('introspection')
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user