Changeset: ac2e5d6b02a4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac2e5d6b02a4
Modified Files:
        ctest/tools/monetdbe/example_remote.c
        tools/monetdbe/CMakeLists.txt
Branch: default
Log Message:

return 0 on expected errors


diffs (32 lines):

diff --git a/ctest/tools/monetdbe/example_remote.c 
b/ctest/tools/monetdbe/example_remote.c
--- a/ctest/tools/monetdbe/example_remote.c
+++ b/ctest/tools/monetdbe/example_remote.c
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <inttypes.h>
 
+#define expected_error(msg) {fprintf(stderr, "Failure: %s\n", msg); return 0;}
 #define error(msg) {fprintf(stderr, "Failure: %s\n", msg); return -1;}
 
 int
@@ -22,7 +23,7 @@ main(void)
 
        // second argument is a string for the db directory or NULL for 
in-memory mode
        if ((err = monetdbe_open(&mdbe, 
"monetdb://localhost:5000/sf1?user=monetdb&password=monetdb", NULL)) != NULL)
-               error(err)
+               expected_error(err)
        if ((err = monetdbe_query(mdbe, "CREATE TABLE test (x integer, y 
string)", NULL, NULL)) != NULL)
                error(err)
        if ((err = monetdbe_query(mdbe, "INSERT INTO test VALUES (42, 'Hello'), 
(NULL, 'World')", NULL, NULL)) != NULL)
diff --git a/tools/monetdbe/CMakeLists.txt b/tools/monetdbe/CMakeLists.txt
--- a/tools/monetdbe/CMakeLists.txt
+++ b/tools/monetdbe/CMakeLists.txt
@@ -15,7 +15,7 @@ add_library(monetdbe SHARED)
 target_sources(monetdbe
   PRIVATE
   monetdbe.c
-  monetdbe_mapi.c
+  monetdbe_mapi.c monetdbe_mapi.h
   ${CMAKE_SOURCE_DIR}/clients/mapiclient/dump.c
   PUBLIC
   ${monetdbe_public_headers})
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to