diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-10 09:58:32 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-10 09:58:32 +0200 |
commit | 0315b3b951cbd547c428ce8bd17cfee63f3a45fd (patch) | |
tree | e3719ebef400fb621d9d27196f87ce357b33de1c /lib | |
parent | a8fed9bcf8daa319ae86f33198530b8e170e2b00 (diff) |
protocol benchmarks: mpack: correctly use expect API
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/protocol_benchmarks.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/protocol_benchmarks.py b/lib/protocol_benchmarks.py index d3d5942..e82af67 100755 --- a/lib/protocol_benchmarks.py +++ b/lib/protocol_benchmarks.py @@ -861,8 +861,8 @@ class MPack(DummyProtocol): self.dec_buf1 += self.add_transition('mpack_expect_map_max(&reader, {:d});\n'.format(len(data)), [len(data)]) for key in sorted(data.keys()): self.enc_buf += self.add_transition('mpack_write_cstr(&writer, "{}");\n'.format(key), [len(key)]) - self.dec_buf += 'mpack_expect_cstr(&reader, strbuf, sizeof(strbuf));\n' - self.dec_buf1 += self.add_transition('mpack_expect_cstr(&reader, strbuf, sizeof(strbuf));\n', [len(key)]) + self.dec_buf += 'mpack_expect_cstr_match(&reader, "{}");\n'.format(key) + self.dec_buf1 += self.add_transition('mpack_expect_cstr_match(&reader, "{}");\n'.format(key), [len(key)]) self.add_value(data[key]) self.enc_buf += 'mpack_finish_map(&writer);\n' self.dec_buf += 'mpack_done_map(&reader);\n' @@ -1318,7 +1318,7 @@ class XDR(DummyProtocol): return self.dec_buf1 def get_decode_output(self): - return 'kout << dec << "dec:";\n' + self.dec_buf2 + 'kout << endl;\n'; + return 'kout << dec << "dec:";\n' + self.dec_buf2 + 'kout << endl;\n' def from_json(self, data): if type(data) == dict: |