Skip to content

Commit 6a9d253

Browse files
author
me
committed
make sure you can serialize/deserialize a value to/from stringstream
1 parent c5dadff commit 6a9d253

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/value.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <sstream>
12
#include "doctest.h"
23
#include "msgpack.h"
34
#include "msgpack_sinks.h"
@@ -123,12 +124,18 @@ TEST_SUITE("[VALUE]")
123124

124125
// pack
125126
std::vector<char> buf0;
127+
std::stringstream buf1;
126128
auto out0 = sink(buf0);
129+
auto out1 = sink(buf1);
127130
jv1.pack(out0);
131+
jv1.pack(out1);
128132

129133
// unpack
130134
auto in0 = source(buf0);
135+
auto in1 = source(buf1);
131136
value jv2 = value::unpack_static(in0);
137+
value jv3 = value::unpack_static(in1);
132138
check_niels(jv2);
139+
check_niels(jv3);
133140
}
134141
}

0 commit comments

Comments
 (0)