utf8rewind
1.5.1
System library for processing UTF-8 encoded text
helpers-seeking.hpp
Go to the documentation of this file.
1
#pragma once
2
10
#include "
helpers-base.hpp
"
11
12
#define EXPECT_SEEKEQ(_input, _expectedOffset, _currentOffset, _length, _startOffset, _offset, _direction) { \
13
::helpers::SeekingParameters e; \
14
e.text = _input + _expectedOffset; \
15
e.offset = _expectedOffset; \
16
e.expression = ""; \
17
::helpers::SeekingParameters a; \
18
a.text = utf8seek(_input + _currentOffset, _length, _input + _startOffset, _offset, _direction); \
19
a.offset = a.text - _input; \
20
a.expression = "utf8seek(" #_input " + " #_currentOffset ", " #_length ", " #_input " + " #_startOffset ", " #_offset ", " #_direction ")"; \
21
EXPECT_PRED_FORMAT2(::helpers::CompareSeeking, e, a); \
22
}
23
24
namespace
helpers {
25
26
struct
SeekingParameters
27
{
28
const
char
* text;
29
size_t
offset;
30
const
char
* expression;
31
};
32
33
::testing::AssertionResult CompareSeeking(
34
const
char
* expressionExpected,
const
char
* expressionActual,
35
const
SeekingParameters& paramsExpected,
const
SeekingParameters& paramsActual);
36
37
};
38
helpers-base.hpp
Base includes for helper methods.
source
helpers
helpers-seeking.hpp
Generated by
1.8.12