2#include "gtest/gtest.h"
3#include <filesystem.hpp>
13using random_bytes_engine =
14 std::independent_bits_engine<std::default_random_engine, 16,
17#define ASSERT_RESOLVES(future, timeout) \
18 ASSERT_TRUE(future.wait_for(timeout) == std::future_status::ready) \
19 << "Future timed out";
21#define ASSERT_NOT_RESOLVES(future, timeout) \
22 ASSERT_NE(future.wait_for(timeout), std::future_status::ready) \
23 << "Future was resolved";
32 std::string ditto_dir;
35namespace TestHelpers {
36extern const std::string test_license;
39std::vector<nlohmann::json>
40map_doc_value(std::vector<ditto::Document>
const &documents);
41std::vector<nlohmann::json>
42map_doc_value_without_id(std::vector<ditto::Document>
const &documents);
43std::vector<ditto::DocumentId>
44map_doc_id(std::vector<ditto::Document> documents);
45nlohmann::json doc_value_without_id(std::shared_ptr<ditto::Document> document);
49std::vector<uint8_t> get_random_bytes(uint32_t num_bytes);
50std::string get_random_string(std::size_t length);
54 {
"_ditto_internal_type_jkb12973t4b",
55 DittoCrdtType::DITTO_CRDT_TYPE_REGISTER}});
Definition TestHelpers.hpp:25
The entrypoint to the Ditto SDK.
Definition Ditto.hpp:32
Definition filesystem.hpp:222
basic_json<> json
default JSON class
Definition json.hpp:2933