changeset 141:e63089fe5bef

- todo update - removed some duped code for plain* tests
author cslag
date Sat, 20 Aug 2016 09:47:45 +0200
parents 5675d34f0a06
children 8d6825e3f064
files ToDo dyncall/dyncall_macros.h test/common/test_framework.h test/plain/test_framework.h test/plain/test_main.c test/plain/test_structs.c test/plain_c++/test_framework.h test/plain_c++/test_main.cc
diffstat 8 files changed, 74 insertions(+), 141 deletions(-) [+]
line wrap: on
line diff
--- a/ToDo	Mon Aug 08 11:54:27 2016 +0200
+++ b/ToDo	Sat Aug 20 09:47:45 2016 +0200
@@ -46,7 +46,6 @@
 --------
 - support for return values: aggregate return values
 - support for argument values: structures, half-precision, vector types, long double
-- varargs for mips (might exist, but test all ABIs (mipseb n64 already confirmed))
 - consider automatic type-promotion for arguments passed through DC_CALL_C_ELLIPSIS_VARARGS;
   this would make it easier to just pass arguments instead of having to know about the C
   type promotions (this is partly done, see todo-item above under 1.0)
@@ -55,11 +54,11 @@
   * linux
 - other syscalls
 - MIPS32 softfloat support (-msoft-float)
-- MIPS64 little-endian needs testing (current port works on openbsd/octeon, which is big endian)
 - test MIPS32 eabi big endian (current port works on psp, which is little endian)
 - implement MIPS64 N32 (gcc -mabi=n32); both, little and big-endian (looks like NetNBSD on and
   EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter)
 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian
+- support for Minix/arm
 
 dynload:
 --------
@@ -81,10 +80,10 @@
 - finish PPC32 callbacks (see bugs section, below, BSD not working)
 - MIPS32 softfloat support (-msoft-float)
 - test MIPS32 eabi big endian (current port works on psp, which is little endian)
-- test MIPS64 n64 little endian (current port works on openbsd/octeon, which is big endian)
 - implement MIPS64 N32 (gcc -mabi=n32); both, little and big-endian (looks like NetNBSD on and
   EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter)
 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian
+- support for Minix/arm
 
 bindings:
 ---------
--- a/dyncall/dyncall_macros.h	Mon Aug 08 11:54:27 2016 +0200
+++ b/dyncall/dyncall_macros.h	Sat Aug 20 09:47:45 2016 +0200
@@ -244,6 +244,7 @@
 # else
 #  define DC__ABI_MIPS_EABI
 # endif
+/*@@@implement/support: __mips_hard_float*/
 #endif /* MIPS */
 
 #if defined(DC__Arch_PPC64)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/common/test_framework.h	Sat Aug 20 09:47:45 2016 +0200
@@ -0,0 +1,68 @@
+/*
+
+ Package: dyncall
+ Library: test
+ File: test/plain_c++/test_framework.h
+ Description: 
+ License:
+
+   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
+                           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
+   copyright notice and this permission notice appear in all copies.
+
+   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+*/
+
+
+
+// 2007-10-11
+
+#ifndef TRUE
+#define TRUE (1)
+#endif
+
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Statement breaking into debugger (for various platforms). @@@add if defined, etc...
+#ifdef _WIN32
+# ifdef _MSC_VER
+#  define DC_TEST_BREAK __debugbreak
+# else
+#  include <windows.h>
+#  define DC_TEST_BREAK DebugBreak
+# endif
+#else
+# define DC_TEST_BREAK
+#endif
+
+// Test state - evaluates to false inside a test function if a test fails.
+#define DC_TEST_STATE				testFramework_state
+
+// Test functions defined by DC_DEFINE_TEST_FUNC_BEGIN and DC_DEFINE_TEST_FUNC_END pairs do come with
+// a default parameter used to pass a path to them specifying where to find external data needed to
+// run the tests (if desired). NULL by default. It can be queried by using DC_TEST_PATH.
+#define DC_TEST_PATH				testFramework_suitePath
+
+// Test a single expression - the expression must evaluate to true in order to succeed.
+// #define DC_TEST(exp)				{ TEST_STATE = TEST_STATE && (exp); if(!TEST_STATE) DC_TEST_BREAK(); }
+
+#include <assert.h>
+
+#define DC_TEST(exp)        assert(exp)
+// { if (! (exp) ) DC_TEST_BREAK(); }
+
+// Macros used to define a test functions.
+#define DC_DEFINE_TEST_FUNC_BEGIN(name)	/*static */int name(/*const char* DC_TEST_PATH=NULL*/) { /*@@@ add logging*/ int TEST_STATE = TRUE;
+#define DC_DEFINE_TEST_FUNC_END			/*@@@ add logging*/ return TEST_STATE; }
--- a/test/plain/test_framework.h	Mon Aug 08 11:54:27 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-
- Package: dyncall
- Library: test
- File: test/plain/test_framework.h
- Description: 
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
-                           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
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-// Statement breaking into debugger (for various platforms). @@@add if defined, etc...
-#ifdef _WIN32
-# ifdef _MSC_VER
-#  define DC_TEST_BREAK __debugbreak
-# else
-#  include <windows.h>
-#  define DC_TEST_BREAK DebugBreak
-# endif
-#else
-# define DC_TEST_BREAK
-#endif
-
-// Test state - evaluates to false inside a test function if a test fails.
-#define DC_TEST_STATE				testFramework_state
-
-// Test functions defined by DC_DEFINE_TEST_FUNC_BEGIN and DC_DEFINE_TEST_FUNC_END pairs do come with
-// a default parameter used to pass a path to them specifying where to find external data needed to
-// run the tests (if desired). NULL by default. It can be queried by using DC_TEST_PATH.
-#define DC_TEST_PATH				testFramework_suitePath
-
-// Test a single expression - the expression must evaluate to true in order to succeed.
-// #define DC_TEST(exp)				{ TEST_STATE = TEST_STATE && (exp); if(!TEST_STATE) DC_TEST_BREAK(); }
-
-#include <assert.h>
-
-#define DC_TEST(exp)        assert(exp)
-// { if (! (exp) ) DC_TEST_BREAK(); }
-
-// Macros used to define a test functions.
-#define DC_DEFINE_TEST_FUNC_BEGIN(name)	/*static */int name(/*const char* DC_TEST_PATH=NULL*/) { /*@@@ add logging*/ int TEST_STATE = TRUE;
-#define DC_DEFINE_TEST_FUNC_END			/*@@@ add logging*/ return TEST_STATE; }
--- a/test/plain/test_main.c	Mon Aug 08 11:54:27 2016 +0200
+++ b/test/plain/test_main.c	Sat Aug 20 09:47:45 2016 +0200
@@ -26,7 +26,7 @@
 
 
 
-#include "test_framework.h"
+#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../common/platformInit.h"
 #include "../common/platformInit.c" /* Impl. for functions only used in this translation unit */
--- a/test/plain/test_structs.c	Mon Aug 08 11:54:27 2016 +0200
+++ b/test/plain/test_structs.c	Sat Aug 20 09:47:45 2016 +0200
@@ -25,7 +25,7 @@
 
 
 
-#include "test_framework.h"
+#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../../dyncall/dyncall_signature.h"
 #include "../../dyncall/dyncall_struct.h"
--- a/test/plain_c++/test_framework.h	Mon Aug 08 11:54:27 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-
- Package: dyncall
- Library: test
- File: test/plain_c++/test_framework.h
- Description: 
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
-                           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
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-
-// 2007-10-11
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-// Statement breaking into debugger (for various platforms). @@@add if defined, etc...
-#ifdef _WIN32
-# ifdef _MSC_VER
-#  define DC_TEST_BREAK __debugbreak
-# else
-#  include <windows.h>
-#  define DC_TEST_BREAK DebugBreak
-# endif
-#else
-# define DC_TEST_BREAK
-#endif
-
-// Test state - evaluates to false inside a test function if a test fails.
-#define DC_TEST_STATE				testFramework_state
-
-// Test functions defined by DC_DEFINE_TEST_FUNC_BEGIN and DC_DEFINE_TEST_FUNC_END pairs do come with
-// a default parameter used to pass a path to them specifying where to find external data needed to
-// run the tests (if desired). NULL by default. It can be queried by using DC_TEST_PATH.
-#define DC_TEST_PATH				testFramework_suitePath
-
-// Test a single expression - the expression must evaluate to true in order to succeed.
-// #define DC_TEST(exp)				{ TEST_STATE = TEST_STATE && (exp); if(!TEST_STATE) DC_TEST_BREAK(); }
-
-#include <assert.h>
-
-#define DC_TEST(exp)        assert(exp)
-// { if (! (exp) ) DC_TEST_BREAK(); }
-
-// Macros used to define a test functions.
-#define DC_DEFINE_TEST_FUNC_BEGIN(name)	/*static */int name(/*const char* DC_TEST_PATH=NULL*/) { /*@@@ add logging*/ int TEST_STATE = TRUE;
-#define DC_DEFINE_TEST_FUNC_END			/*@@@ add logging*/ return TEST_STATE; }
--- a/test/plain_c++/test_main.cc	Mon Aug 08 11:54:27 2016 +0200
+++ b/test/plain_c++/test_main.cc	Sat Aug 20 09:47:45 2016 +0200
@@ -26,7 +26,7 @@
 
 
 
-#include "test_framework.h"
+#include "../common/test_framework.h"
 #include "../../dyncall/dyncall.h"
 #include "../common/platformInit.h"
 #include "../common/platformInit.c" /* Impl. for functions only used in this translation unit */