Skip to content

Commit 31ebb4a

Browse files
committed
UPD | docs: routers #3
1 parent ddf2475 commit 31ebb4a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ add_compile_options($<$<CXX_COMPILER_ID:GNU>:-fmerge-all-constants>)
66

77
set(MANAPIHTTP_TEST_TOOL_FILES "utest.h" "tools.hpp")
88

9-
set(MANAPIHTTP_TESTS_SOURCES test_bigint.cpp test_timer.cpp test_fs.cpp test_fs_io.cpp test_http_and_fetch.cpp test_json.cpp test_json_masks.cpp test_parse.cpp test_http_and_fetch_keep_alive.cpp test_function.cpp test_std.cpp)
9+
set(MANAPIHTTP_TESTS_SOURCES test_std.cpp test_bigint.cpp test_timer.cpp test_fs.cpp test_fs_io.cpp test_http_and_fetch.cpp test_json.cpp test_json_masks.cpp test_parse.cpp test_http_and_fetch_keep_alive.cpp test_function.cpp)
1010
foreach(test ${MANAPIHTTP_TESTS_SOURCES})
1111
set(test_name ${test}_ctest)
1212
include_directories(${test_name} "../include" "${CMAKE_BINARY_DIR}/include")

tests/test_std.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
#include "ManapiString.hpp"
22

33
#include "./utest.h"
4-
#include "./tools.hpp"
54

6-
UTEST(std_string, replace_1) {
5+
UTEST(std_string, str_replace_1) {
76
std::string a = "Hello$2!";
87
auto res = manapi::string::replace(a, "$2", ", world");
98

109
ASSERT_TRUE(a == "Hello, world!");
1110
ASSERT_TRUE(1 == res);
1211
}
1312

14-
UTEST(std_string, replace_2) {
13+
UTEST(std_string, str_replace_2) {
1514
std::string a = "Hello$2!Hello$2!";
1615
auto res = manapi::string::replace(a, "$2", ", world");
1716

1817
ASSERT_TRUE(a == "Hello, world!Hello, world!");
1918
ASSERT_TRUE(2 == res);
2019
}
2120

22-
UTEST(std_string, replace_3) {
21+
UTEST(std_string, str_replace_3) {
2322
std::string a = "Hello$2!Hello$2!";
2423
auto res = manapi::string::replace(a, "$2", ", world", 1);
2524

2625
ASSERT_TRUE(a == "Hello, world!Hello$2!");
2726
ASSERT_TRUE(1 == res);
2827
}
2928

30-
UTEST(std_string, replace_4) {
29+
UTEST(std_string, str_replace_4) {
3130
std::string a = "Hello$2!Hello$2!";
3231
auto res = manapi::string::replace(a, "$2", ", world", 0);
3332

@@ -36,12 +35,12 @@ UTEST(std_string, replace_4) {
3635
}
3736

3837

39-
UTEST(std_string, replace_5) {
38+
UTEST(std_string, str_replace_5) {
4039
std::string a = "$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2";
4140
auto res = manapi::string::replace(a, "$2", ", world", 9);
4241

4342
ASSERT_TRUE(a == ", world, world, world, world, world, world, world, world, world$2$2$2$2$2$2$2$2$2$2$2$2$2$2$2");
4443
ASSERT_TRUE(9 == res);
4544
}
4645

47-
MANAPIHTTP_TESTS_MAIN
46+
UTEST_MAIN();

0 commit comments

Comments
 (0)