codex
Loading...
Searching...
No Matches
common.hpp
Go to the documentation of this file.
1
#ifndef CODEX_TEST_COMMON_H
2
#define CODEX_TEST_COMMON_H
3
4
#include <string>
5
#include <string_view>
6
7
#include <QTest>
8
9
namespace
std
{
10
14
char
*
toString
(string_view
s
) {
15
return
QTest::toString(
16
QString::fromUtf8(
s
.
data
(),
17
static_cast<
int
>
(
s
.
size
())));
18
}
19
23
char
*
toString
(
string
s
)
24
{
return
toString
(
static_cast<
std::string_view
>
(
s
)); }
25
26
}
27
28
#endif
std
Definition
common.hpp:9
std::toString
char * toString(string_view s)
Adaptor function to display string_view values in test assertion messages.
Definition
common.hpp:14
fixed_string::data
constexpr const char * data(void) const
Definition
utils.hpp:18
fixed_string::size
constexpr std::size_t size(void) const
Definition
utils.hpp:17
s
constexpr fixed_string s
Definition
test.cpp:6
tmp
test
common.hpp
Generated by
1.11.0