aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-10-11 21:49:14 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-10-11 21:49:14 +0200
commit2336277e700ec5ea9aa7582e93000cece7f7b120 (patch)
treeb267bfd1cabb3d9423ba2509c2bf299a803081d1 /vespalib/src/tests
parent982a1b1804b8773be2c5db13535fa0b0e33928b1 (diff)
Eliminate noexcept warnings.
Diffstat (limited to 'vespalib/src/tests')
-rw-r--r--vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp2
-rw-r--r--vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp2
-rw-r--r--vespalib/src/tests/portal/portal_test.cpp2
-rw-r--r--vespalib/src/tests/time_tracer/time_tracer_test.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp
index 37a22108dc5..6a9215c3eb9 100644
--- a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp
+++ b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp
@@ -40,7 +40,7 @@ struct DictionaryReadTest : public ::testing::Test {
{
}
DictionaryReadTest& add(uint32_t value) {
- auto result = dict.add(Comparator(value), [=]() { return EntryRef(value); });
+ auto result = dict.add(Comparator(value), [=]() noexcept { return EntryRef(value); });
assert(result.inserted());
return *this;
}
diff --git a/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp b/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp
index 6d178093069..71c4a7856c8 100644
--- a/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp
+++ b/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp
@@ -57,7 +57,7 @@ struct CheckType {
};
struct Nop {
- void operator()() const {}
+ void operator()() const noexcept {}
};
//-----------------------------------------------------------------------------
diff --git a/vespalib/src/tests/portal/portal_test.cpp b/vespalib/src/tests/portal/portal_test.cpp
index 0bd029c0c3a..07d3b9e1bfb 100644
--- a/vespalib/src/tests/portal/portal_test.cpp
+++ b/vespalib/src/tests/portal/portal_test.cpp
@@ -202,7 +202,7 @@ TEST("require that get requests dropped on the floor returns HTTP error") {
vespalib::string path = "/test";
auto portal = Portal::create(null_crypto(), 0);
auto expect = make_expected_error(500, "Internal Server Error");
- MyGetHandler handler([](Portal::GetRequest){});
+ MyGetHandler handler([](Portal::GetRequest) noexcept {});
auto bound = portal->bind(path, handler);
auto result = fetch(portal->listen_port(), null_crypto(), path);
EXPECT_EQUAL(result, expect);
diff --git a/vespalib/src/tests/time_tracer/time_tracer_test.cpp b/vespalib/src/tests/time_tracer/time_tracer_test.cpp
index d7e2e0d579a..6d55e867ba5 100644
--- a/vespalib/src/tests/time_tracer/time_tracer_test.cpp
+++ b/vespalib/src/tests/time_tracer/time_tracer_test.cpp
@@ -67,8 +67,8 @@ TEST("require that records are extracted inversely ordered by end time per threa
}
TEST("benchmark time sampling") {
- double min_stamp_us = 1000000.0 * BenchmarkTimer::benchmark([](){ (void) TimeTracer::now(); }, 1.0);
- double min_sample_us = 1000000.0 * BenchmarkTimer::benchmark([](){ TT_Sample my_sample(my_tag); }, 1.0);
+ double min_stamp_us = 1000000.0 * BenchmarkTimer::benchmark([]() noexcept { (void) TimeTracer::now(); }, 1.0);
+ double min_sample_us = 1000000.0 * BenchmarkTimer::benchmark([]() noexcept { TT_Sample my_sample(my_tag); }, 1.0);
fprintf(stderr, "min timestamp time: %g us\n", min_stamp_us);
fprintf(stderr, "min sample time: %g us\n", min_sample_us);
fprintf(stderr, "estimated non-clock overhead: %g us\n", (min_sample_us - (min_stamp_us * 2.0)));