add within
This commit is contained in:
@@ -5,7 +5,16 @@ test(
|
||||
'split_str',
|
||||
executable(
|
||||
'split_str',
|
||||
'split_str.cpp',
|
||||
'string.cpp',
|
||||
dependencies: [ string_dep, gtest_dep ]
|
||||
)
|
||||
)
|
||||
|
||||
test(
|
||||
'within',
|
||||
executable(
|
||||
'within',
|
||||
'range.cpp',
|
||||
dependencies: [ range_dep, gtest_dep ]
|
||||
)
|
||||
)
|
||||
|
||||
9
tests/range.cpp
Normal file
9
tests/range.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "range/range.hpp"
|
||||
|
||||
TEST(within, check)
|
||||
{
|
||||
ASSERT_EQ(hack::within(23, 123, 34, 44, 55, 66), true);
|
||||
ASSERT_EQ(hack::within(23, 123, 134, 44, 55, 66), false);
|
||||
}
|
||||
Reference in New Issue
Block a user