Expose repository functions to sharedlibs

This commit is contained in:
Pijus Kamandulis
2024-12-20 20:25:32 +02:00
parent 363f822e5a
commit bcf4b513b6
10 changed files with 484 additions and 41 deletions

View File

@@ -1,8 +1,9 @@
#include "shared.h"
void test_CreateServerInstance();
void test_StopServerInstance();
void test_ServerInstanceStateMethods();
int test_CreateServerInstance();
int test_StopServerInstance();
int test_ServerInstanceStateMethods();
int test_Databases();
int main(int argc, char *argv[])
{
@@ -21,9 +22,24 @@ int main(int argc, char *argv[])
}
printf("Running tests for library: %s\n", libPath);
test_CreateServerInstance();
test_ServerInstanceStateMethods();
test_StopServerInstance();
int results[] = {
test_CreateServerInstance(),
test_Databases(),
test_ServerInstanceStateMethods(),
test_StopServerInstance(),
};
int numTests = sizeof(results) / sizeof(results[0]);
int numPassed = 0;
for (int i = 0; i < numTests; i++)
{
if (results[i])
{
numPassed++;
}
}
printf("Tests passed: %d/%d\n", numPassed, numTests);
dlclose(handle);
return EXIT_SUCCESS;