diff test/dynload_plain/dynload_plain.c @ 410:7608e34098b0

- cleanups, simplifications, some api clarification, ... - test cases consistency: * return status code depending on test results (for actual conformance tests, not stuff that is not an example or hack to check something, ..) * platform init helper added for some
author Tassilo Philipp
date Tue, 05 Oct 2021 21:53:04 +0200
parents dd5d03483314
children
line wrap: on
line diff
--- a/test/dynload_plain/dynload_plain.c	Sun Oct 03 19:41:41 2021 +0200
+++ b/test/dynload_plain/dynload_plain.c	Tue Oct 05 21:53:04 2021 +0200
@@ -6,7 +6,7 @@
  Description: 
  License:
 
-   Copyright (c) 2017-2018 Tassilo Philipp <tphilipp@potion-studios.com>
+   Copyright (c) 2017-2021 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,6 +25,7 @@
 
 #include "../../dynload/dynload.h"
 #include "../common/platformInit.h"
+#include "../common/platformInit.c" /* Impl. for functions only used in this translation unit */
 
 #include <string.h>
 #include <sys/stat.h>
@@ -89,6 +90,8 @@
     "C:\\Windows\\system32\\msvcrt.dll"
   };
 
+  dcTest_initPlatform();
+
   /* use first matching path of hacky hardcoded list, above */
   for(i=0; i<(sizeof(clibs)/sizeof(const char*)); ++i) {
     if(access(clibs[i], F_OK) != -1) {
@@ -280,6 +283,9 @@
   /* Check final score of right ones to see if all worked */
   r = (r == 16 + cmp_inode);
   printf("result: dynload_plain: %d\n", r);
+
+  dcTest_deInitPlatform();
+
   return !r;
 }