mono / gir-sharp

C# binding generator for GIR format
MIT License
12 stars 10 forks source link

Test against libeverything #44

Open sundermann opened 6 years ago

sundermann commented 6 years ago

g-ir-scanner can generate .c files which are used internally for testing by gobject-introspection. These files provide very basic methods.

# generate c files
$(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS)  \
    --generate-typelib-tests=Everything,everything.h,everything.c   \
    --function-decoration=_GI_TEST_EXTERN   \
    --include-first-in-src=config.h \
--include-last-in-header=gitestmacros.h
# compile
...
# run introspection parser to get .gir files
$(AM_V_GEN) $(INTROSPECTION_SCANNER) $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error --reparse-validate \
    --namespace=Everything --nsversion=1.0 \
    --libtool="$(LIBTOOL)" \
    --add-include-path=$(top_builddir) --include=Gio-2.0 \
    --library=libeverything-1.0.la --output=$@ \
    -I$(srcdir) \
everything.h everything.c

We can generate bindings for the test library and see if pinvoking into the library works.

decriptor commented 6 years ago

I just saw this 16:09 < ptomato[m]> mortisha: "libeverything" is now called "libregress". Is it libregress that we want then?