diff test/plain/test_structs.c @ 324:dd78bd0152af

- removal of never-adopted mini-test framework stub - test/plain: better output and cleanup - test/plain_c++: better output and re-enabled this calls for other platforms than windows (was disabled by mistake)
author Tassilo Philipp
date Thu, 21 Nov 2019 12:50:37 +0100
parents e63089fe5bef
children 1cf6a4a94aca
line wrap: on
line diff
--- a/test/plain/test_structs.c	Sat Nov 16 00:15:58 2019 +0100
+++ b/test/plain/test_structs.c	Thu Nov 21 12:50:37 2019 +0100
@@ -3,10 +3,11 @@
  Package: dyncall
  Library: test
  File: test/plain/test_structs.c
- Description: 
+ Description:
  License:
 
    Copyright (c) 2010-2015 Olivier Chafik <olivier.chafik@gmail.com>
+                      2019 Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
@@ -25,7 +26,6 @@
 
 
 
-#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../../dyncall/dyncall_signature.h"
 #include "../../dyncall/dyncall_struct.h"
@@ -34,14 +34,16 @@
 #define DC_TEST_INT_EQUAL(expected, computed) { \
 	if (expected != computed) \
 		printf("expected = %d, computed = %d\n\n", (int)expected, (int)computed); \
-	DC_TEST(expected == computed); \
+	ret = (expected == computed) && ret; \
 }
 #define DC_TEST_STRUCT_SIZE(type, s) { \
 	DCsize expected = sizeof(type), computed = dcStructSize(s);\
 	DC_TEST_INT_EQUAL(expected, computed); \
 }
 
-DC_DEFINE_TEST_FUNC_BEGIN(testStructSizes)
+int testStructSizes()
+{
+	int ret = 1;
 
 	{
 		typedef struct {
@@ -128,7 +130,8 @@
 	TEST_MONO_STRUCT(float,              DC_SIGCHAR_FLOAT);
 	TEST_MONO_STRUCT(double,             DC_SIGCHAR_DOUBLE);
 
-DC_DEFINE_TEST_FUNC_END
+	return ret;
+}
 
 
 
@@ -156,7 +159,9 @@
 }
 
 
-DC_DEFINE_TEST_FUNC_BEGIN(testCallStructs)
+int testCallStructs()
+{
+	int ret = 1;
 
 	DCCallVM* pc = dcNewCallVM(4096);
 	{
@@ -214,5 +219,6 @@
 
 	dcFree(pc);
 
-DC_DEFINE_TEST_FUNC_END
+	return ret;
+}