Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 25 lines 1.0 kB view raw
1diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt 2index 58ab5c2..4f56a25 100644 3--- a/tests/CMakeLists.txt 4+++ b/tests/CMakeLists.txt 5@@ -1,5 +1,7 @@ 6 include(GoogleTest) 7 8+set(CMAKE_CXX_STANDARD 17) 9+ 10 function(add_gmock_test target) 11 add_executable(${target} ${ARGN}) 12 target_link_libraries(${target} config playlist bookmarks event_bus ${GMOCK_BOTH_LIBRARIES} ${XDG_BASEDIR_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES} ${JSONCPP_LIBRARIES} pthread) 13diff --git a/tests/bookmarks_test.cpp b/tests/bookmarks_test.cpp 14index 2d72356..97f898a 100644 15--- a/tests/bookmarks_test.cpp 16+++ b/tests/bookmarks_test.cpp 17@@ -215,7 +215,7 @@ TEST(Bookmarks, test_that_stations_are_added_and_removed_from_a_group_and_moved) 18 ASSERT_FALSE(bm[0].stations[0].notifications); 19 20 // vector only throws when using at() 21- EXPECT_THROW(bm[0].stations.at(100), std::out_of_range); 22+ EXPECT_THROW(static_cast<void>(bm[0].stations.at(100)), std::out_of_range); 23 EXPECT_THROW(bm[1], std::out_of_range); 24 } 25