diff options
Diffstat (limited to 'searchlib/src/tests/prettyfloat')
-rw-r--r-- | searchlib/src/tests/prettyfloat/.gitignore | 4 | ||||
-rw-r--r-- | searchlib/src/tests/prettyfloat/CMakeLists.txt | 8 | ||||
-rw-r--r-- | searchlib/src/tests/prettyfloat/prettyfloat.cpp | 31 |
3 files changed, 0 insertions, 43 deletions
diff --git a/searchlib/src/tests/prettyfloat/.gitignore b/searchlib/src/tests/prettyfloat/.gitignore deleted file mode 100644 index bf0327f3372..00000000000 --- a/searchlib/src/tests/prettyfloat/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.depend -Makefile -prettyfloat_test -searchlib_prettyfloat_test_app diff --git a/searchlib/src/tests/prettyfloat/CMakeLists.txt b/searchlib/src/tests/prettyfloat/CMakeLists.txt deleted file mode 100644 index 907b7661800..00000000000 --- a/searchlib/src/tests/prettyfloat/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -vespa_add_executable(searchlib_prettyfloat_test_app TEST - SOURCES - prettyfloat.cpp - DEPENDS - searchlib -) -vespa_add_test(NAME searchlib_prettyfloat_test_app COMMAND searchlib_prettyfloat_test_app) diff --git a/searchlib/src/tests/prettyfloat/prettyfloat.cpp b/searchlib/src/tests/prettyfloat/prettyfloat.cpp deleted file mode 100644 index a84ac59c964..00000000000 --- a/searchlib/src/tests/prettyfloat/prettyfloat.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/log/log.h> -LOG_SETUP("prettyfloat_test"); -#include <vespa/vespalib/testkit/testapp.h> -#include <vespa/searchlib/util/rawbuf.h> -#include <vespa/searchlib/common/hitrank.h> - -using namespace search; - -TEST_SETUP(Test); - -int -Test::Main() -{ - TEST_INIT("prettyfloat_test"); - { - RawBuf buf(5000); - SignedHitRank rank = 10; - buf.addSignedHitRank(rank); - *buf.GetWritableFillPos() = '\0'; - EXPECT_EQUAL(std::string("10"), buf.GetDrainPos()); - } - { - RawBuf buf(5000); - HitRank rank = 10; - buf.addHitRank(rank); - *buf.GetWritableFillPos() = '\0'; - EXPECT_EQUAL(std::string("10"), buf.GetDrainPos()); - } - TEST_DONE(); -} |