From 6465e482a1257b12843602b6d55576c4f343212f Mon Sep 17 00:00:00 2001 From: def Date: Thu, 6 May 2021 15:39:34 +0200 Subject: [PATCH] Add unit test for empty range --- CMakeLists.txt | 1 + src/test/sorted_array.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/test/sorted_array.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index bce9ea43e..a1ce29eeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2203,6 +2203,7 @@ if(GTEST_FOUND OR DOWNLOAD_GTEST) netaddr.cpp packer.cpp prng.cpp + sorted_array.cpp str.cpp strip_path_and_extension.cpp teehistorian.cpp diff --git a/src/test/sorted_array.cpp b/src/test/sorted_array.cpp new file mode 100644 index 000000000..a02edddfa --- /dev/null +++ b/src/test/sorted_array.cpp @@ -0,0 +1,9 @@ +#include + +#include + +TEST(SortedArray, SortEmptyRange) +{ + sorted_array x; + x.sort_range(); +}