diff options
Diffstat (limited to 'staging_vespalib/src/tests')
-rw-r--r-- | staging_vespalib/src/tests/librarypool/.gitignore | 1 | ||||
-rw-r--r-- | staging_vespalib/src/tests/librarypool/CMakeLists.txt | 8 | ||||
-rw-r--r-- | staging_vespalib/src/tests/librarypool/librarypool_test.cpp | 38 |
3 files changed, 0 insertions, 47 deletions
diff --git a/staging_vespalib/src/tests/librarypool/.gitignore b/staging_vespalib/src/tests/librarypool/.gitignore deleted file mode 100644 index 1a1aea2fda0..00000000000 --- a/staging_vespalib/src/tests/librarypool/.gitignore +++ /dev/null @@ -1 +0,0 @@ -staging_vespalib_librarypool_test_app diff --git a/staging_vespalib/src/tests/librarypool/CMakeLists.txt b/staging_vespalib/src/tests/librarypool/CMakeLists.txt deleted file mode 100644 index 83e1e92e680..00000000000 --- a/staging_vespalib/src/tests/librarypool/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -vespa_add_executable(staging_vespalib_librarypool_test_app TEST - SOURCES - librarypool_test.cpp - DEPENDS - staging_vespalib -) -vespa_add_test(NAME staging_vespalib_librarypool_test_app COMMAND staging_vespalib_librarypool_test_app) diff --git a/staging_vespalib/src/tests/librarypool/librarypool_test.cpp b/staging_vespalib/src/tests/librarypool/librarypool_test.cpp deleted file mode 100644 index adefdf3aa6b..00000000000 --- a/staging_vespalib/src/tests/librarypool/librarypool_test.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/vespalib/testkit/testapp.h> -#include <vespa/vespalib/util/librarypool.h> -#include <vespa/vespalib/util/exceptions.h> - -using namespace vespalib; - -class Test : public TestApp -{ -public: - int Main() override; -}; - -int -Test::Main() -{ - TEST_INIT("librarypool_test"); - LibraryPool p; - ASSERT_TRUE(p.get("z") == NULL); - p.loadLibrary("z"); - ASSERT_TRUE(p.get("z") != NULL); - ASSERT_TRUE(p.get("z")->GetSymbol("some_symbol_that_is_not_there") == NULL); - ASSERT_TRUE(p.get("z")->GetSymbol("compress") != NULL); - try { - p.loadLibrary("not_found"); - ASSERT_TRUE(false); - } catch (const IllegalArgumentException & e) { - ASSERT_TRUE(p.get("not_found") == NULL); - } - { - const LibraryPool & c(p); - ASSERT_TRUE(c.get("z") != NULL); - ASSERT_TRUE(c.get("not_found") == NULL); - } - TEST_DONE(); -} - -TEST_APPHOOK(Test) |