Skip to content
Snippets Groups Projects
Commit b432ca19 authored by florian's avatar florian
Browse files

ENH: Add OTHER_CLIENT_ERROR to EXTERN C interface

parent e789ec01
No related branches found
No related tags found
2 merge requests!12F consolidation,!8ENH: Add retrieval and queries to Extern C interface
Pipeline #11988 passed
Pipeline: caosdb-cppinttest

#11989

    ......@@ -52,6 +52,12 @@ int caosdb_constants_COMPATIBLE_SERVER_VERSION_PATCH();
    */
    const char *caosdb_constants_COMPATIBLE_SERVER_VERSION_PRE_RELEASE();
    /**
    * Return the status code reserved for errors in clients wrapping this
    * interface.
    */
    int caosdb_status_code_OTHER_CLIENT_ERROR();
    /**
    * A wrapper of the C++ Connection class.
    *
    ......
    ......@@ -164,6 +164,10 @@ const char *caosdb_constants_COMPATIBLE_SERVER_VERSION_PRE_RELEASE() {
    return caosdb::COMPATIBLE_SERVER_VERSION_PRE_RELEASE;
    }
    int caosdb_status_code_OTHER_CLIENT_ERROR() {
    return caosdb::StatusCode::OTHER_CLIENT_ERROR;
    }
    const char *caosdb_utility_get_env_var(const char *name, const char *fallback) {
    return caosdb::utility::get_env_var(name, fallback);
    }
    ......
    ......@@ -50,6 +50,11 @@ TEST_F(test_ccaosdb, test_get_env_var) {
    EXPECT_EQ("fall-back", some_var);
    }
    TEST_F(test_ccaosdb, test_other_client_error) {
    EXPECT_EQ(caosdb_status_code_OTHER_CLIENT_ERROR(),
    caosdb::StatusCode::OTHER_CLIENT_ERROR);
    }
    TEST_F(test_ccaosdb, test_get_default_connection) {
    caosdb_connection_connection out;
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment