compiler/Makefile
vapi/Makefile
tests/Makefile
+ tests/fastvapi/Makefile
tests/girwriter/Makefile
doc/Makefile
doc/manual/Makefile
NULL =
SUBDIRS = \
+ fastvapi \
girwriter \
$(NULL)
--- /dev/null
+NULL =
+
+check-fastvapi: $(top_builddir)/compiler/valac
+ G_DEBUG=fatal-warnings $(top_builddir)/compiler/valac \
+ -C \
+ --disable-version-header \
+ --vapidir $(top_srcdir)/vapi \
+ --fast-vapi fastvapitest.vapi \
+ --basedir $(srcdir) \
+ $(srcdir)/fastvapitest.vala; \
+ tail -n +3 fastvapitest.vapi | diff -wu $(srcdir)/fastvapitest.vapi-expected - || exit 1; \
+ G_DEBUG=fatal-warnings $(top_builddir)/compiler/valac \
+ -C \
+ --disable-version-header \
+ --vapidir $(top_srcdir)/vapi \
+ --use-fast-vapi fastvapitest.vapi \
+ --basedir $(builddir) \
+ $(srcdir)/usefastvapitest.vala || exit 1; \
+ rm -f fastvapitest.vapi fastvapitest.c usefastvapitest.c
+
+check: check-fastvapi
+
+EXTRA_DIST = \
+ fastvapitest.vala \
+ fastvapitest.vapi-expected \
+ usefastvapitest.vala \
+ $(NULL)
+
+CLEANFILES = \
+ fastvapitest.c \
+ fastvapitest.vapi \
+ usefastvapitest.c \
+ $(NULL)
--- /dev/null
+namespace FastVapi {
+ public const int CONSTANT = 42;
+
+ public enum EnumTest {
+ VALUE
+ }
+
+ public errordomain ErrorTest {
+ FAILED
+ }
+
+ public struct TestStruct {
+ public int field_name;
+ }
+
+ public interface InterfaceTest : Object {
+ public abstract int property { get; construct set; }
+ public abstract void method (int param);
+ }
+
+ public delegate bool DelegateTest (int param);
+
+ public class Test : Object {
+ public signal void some_signal (int param);
+
+ public int field;
+
+ public weak Test weak_field;
+
+ public string property { get; construct set; }
+
+ public weak Test weak_property { get; private set; }
+
+ public Test.sub () {
+ }
+
+ public void method () {
+ }
+ }
+
+ public struct TestSubStruct : TestStruct {
+ public static int static_field_name;
+ }
+
+ public const int CONSTANT_TWO = CONSTANT;
+
+ public enum EnumTestTwo {
+ VALUE = 3,
+ VALUE_TWO = VALUE,
+ }
+
+ public class TestFundamental {
+ private TestFundamental () {
+ }
+ }
+
+ public abstract class AbstractTest {
+ }
+}
--- /dev/null
+using GLib;
+
+namespace FastVapi {
+ public class Test : Object {
+ public int field;
+ public weak Test weak_field;
+ public Test.sub ();
+ public void method ();
+ public Test ();
+ public string property { get; set construct; }
+ public weak Test weak_property { get; private set; }
+ public signal void some_signal (int param);
+ }
+ public class TestFundamental {
+ }
+ public abstract class AbstractTest {
+ protected AbstractTest ();
+ }
+ public interface InterfaceTest : Object {
+ public abstract void method (int param);
+ public abstract int property { get; set construct; }
+ }
+ public struct TestStruct {
+ public int field_name;
+ }
+ public struct TestSubStruct : TestStruct {
+ public static int static_field_name;
+ }
+ public enum EnumTest {
+ VALUE
+ }
+ public enum EnumTestTwo {
+ VALUE = 3,
+ VALUE_TWO
+ }
+ public errordomain ErrorTest {
+ FAILED
+ }
+ public delegate bool DelegateTest (int param);
+ public const int CONSTANT = 42;
+ public const int CONSTANT_TWO;
+}
--- /dev/null
+void main () {
+ assert (FastVapi.CONSTANT == 42);
+ assert (FastVapi.CONSTANT_TWO == 42);
+
+ assert (FastVapi.EnumTestTwo.VALUE == 3);
+ assert (FastVapi.EnumTestTwo.VALUE_TWO == 3);
+}