This repository has been archived on 2024-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
resply/tests/pipelined.cc

29 lines
722 B
C++

//
// Copyright 2018 Christoph Heiss <me@christoph-heiss.me>
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE in the project root directory
// or copy at http://www.boost.org/LICENSE_1_0.txt
//
#include "resply.h"
int main()
{
resply::Client client;
client.connect();
client.command("set", "a", "0");
auto result = client.pipelined()
.command("incr", "a")
.command("incr", "a")
.command("incr", "a")
.send();
return !(result.size() == 3 &&
result[0].integer == 1 &&
result[1].integer == 2 &&
result[2].integer == 3);
}