Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
745049be
Commit
745049be
authored
May 23, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try again to placate MSVC.
parent
bc566b58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
encoding-test.c++
c++/src/kj/encoding-test.c++
+6
-6
No files found.
c++/src/kj/encoding-test.c++
View file @
745049be
...
...
@@ -34,10 +34,10 @@ CappedArray<char, sizeof(char32_t) * 2 + 1> hex(char32_t i) { return kj::hex((ui
//
// TODO(cleanup): Should this go into string.h with the other definitions of hex()?
template
<
typename
T
>
template
<
typename
T
,
typename
U
>
void
expectResImpl
(
EncodingResult
<
T
>
result
,
ArrayPtr
<
const
Decay
<
decltype
(
result
[
0
])
>
>
expected
,
bool
errors
=
false
)
{
ArrayPtr
<
const
U
>
expected
,
bool
errors
=
false
)
{
if
(
errors
)
{
KJ_EXPECT
(
result
.
hadErrors
);
}
else
{
...
...
@@ -50,9 +50,9 @@ void expectResImpl(EncodingResult<T> result,
}
}
template
<
typename
T
,
size_t
s
>
template
<
typename
T
,
typename
U
,
size_t
s
>
void
expectRes
(
EncodingResult
<
T
>
result
,
const
Decay
<
decltype
(
result
[
0
])
>
(
&
expected
)[
s
],
const
U
(
&
expected
)[
s
],
bool
errors
=
false
)
{
expectResImpl
(
kj
::
mv
(
result
),
arrayPtr
(
expected
,
s
-
1
),
errors
);
}
...
...
@@ -61,7 +61,7 @@ template <typename T, size_t s>
void
expectRes
(
EncodingResult
<
T
>
result
,
byte
(
&
expected
)[
s
],
bool
errors
=
false
)
{
expectResImpl
(
kj
::
mv
(
result
),
arrayPtr
(
expected
,
s
),
errors
);
expectResImpl
(
kj
::
mv
(
result
),
arrayPtr
<
const
byte
>
(
expected
,
s
),
errors
);
}
KJ_TEST
(
"encode UTF-8 to UTF-16"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment