[vala] tests: Add missing cast-void-not-allowed.c-expected



commit 17a848662c80fb42c0fb7e693a39d9cea2b67677
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Sep 14 23:28:43 2021 +0200

    tests: Add missing cast-void-not-allowed.c-expected

 tests/semantic/cast-void-not-allowed.c-expected | 50 +++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
---
diff --git a/tests/semantic/cast-void-not-allowed.c-expected b/tests/semantic/cast-void-not-allowed.c-expected
new file mode 100644
index 000000000..93f91458f
--- /dev/null
+++ b/tests/semantic/cast-void-not-allowed.c-expected
@@ -0,0 +1,50 @@
+/* semantic_cast_void_not_allowed.c generated by valac, the Vala compiler
+ * generated from semantic_cast_void_not_allowed.vala, do not modify */
+
+#include <glib.h>
+
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, 
__LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, 
G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning 
(G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, 
__LINE__, G_STRFUNC, msg);
+
+VALA_EXTERN gboolean success;
+gboolean success = FALSE;
+
+VALA_EXTERN gboolean foo (void);
+static void _vala_main (void);
+
+gboolean
+foo (void)
+{
+       gboolean result = FALSE;
+       success = TRUE;
+       result = TRUE;
+       return result;
+}
+
+static void
+_vala_main (void)
+{
+       foo ();
+       _vala_assert (success, "success");
+}
+
+int
+main (int argc,
+      char ** argv)
+{
+       _vala_main ();
+       return 0;
+}
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]