mirror of
https://github.com/red0124/ssp.git
synced 2025-12-14 21:59:55 +01:00
add splitter tests
This commit is contained in:
@@ -1,26 +1,7 @@
|
||||
#include "test_helpers.hpp"
|
||||
#include <algorithm>
|
||||
#include <ss/converter.hpp>
|
||||
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
#include <doctest/doctest.h>
|
||||
#else
|
||||
#include <doctest.h>
|
||||
#endif
|
||||
|
||||
class buffer {
|
||||
constexpr static auto buff_size = 1024;
|
||||
char data_[buff_size];
|
||||
|
||||
public:
|
||||
char* operator()(const char* data) {
|
||||
memset(data_, '\0', buff_size);
|
||||
strcpy(data_, data);
|
||||
return data_;
|
||||
}
|
||||
};
|
||||
|
||||
static buffer buff;
|
||||
|
||||
TEST_CASE("testing split") {
|
||||
ss::converter c;
|
||||
for (const auto& [s, expected, delim] :
|
||||
|
||||
Reference in New Issue
Block a user