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:
22
test/test_helpers.hpp
Normal file
22
test/test_helpers.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <cstring>
|
||||
|
||||
#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_;
|
||||
}
|
||||
};
|
||||
|
||||
[[maybe_unused]] inline buffer buff;
|
||||
Reference in New Issue
Block a user