-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathbatch_tests.cpp
More file actions
75 lines (73 loc) · 2.05 KB
/
batch_tests.cpp
File metadata and controls
75 lines (73 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <gtest/gtest.h>
#include "databento/batch.hpp"
#include "databento/constants.hpp"
#include "databento/enums.hpp"
namespace databento::tests {
TEST(BatchTests, TestBatchJobToString) {
const BatchJob target{"AN_ID",
"USER",
12.39,
dataset::kXnasItch,
{"CL.FUT"},
SType::Parent,
SType::InstrumentId,
Schema::Ohlcv1M,
{},
{},
{},
Encoding::Dbn,
Compression::None,
true,
false,
true,
SplitDuration::Week,
{},
false,
Delivery::Download,
10250,
35000000,
20000000,
0,
JobState::Processing,
{},
{},
{},
{},
{},
std::optional<std::uint8_t>{50}};
const auto res = ToString(target);
ASSERT_EQ(res, R"(BatchJob {
id = "AN_ID",
user_id = "USER",
cost_usd = 12.39,
dataset = "XNAS.ITCH",
symbols = { "CL.FUT" },
stype_in = parent,
stype_out = instrument_id,
schema = ohlcv-1m,
start = "",
end = "",
limit = 0,
encoding = dbn,
compression = none,
pretty_px = true,
pretty_ts = false,
map_symbols = true,
split_duration = week,
split_size = 0,
split_symbols = false,
delivery = download,
record_count = 10250,
billed_size = 35000000,
actual_size = 20000000,
package_size = 0,
state = processing,
ts_received = "",
ts_queued = "",
ts_process_start = "",
ts_process_done = "",
ts_expiration = "",
progress = 50
})");
}
} // namespace databento::tests