aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/ut/repeated_fields.incl
blob: e9548917d8626d5b2c880a14dcef94247468d290 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Intentionally no #pragma once

// (Field name == JSON key, Type, Values...)
DEFINE_REPEATED_FIELD(I32, i32, Min<i32>(), -1, 0, 1, Max<i32>())
DEFINE_REPEATED_FIELD(I64, i64, Min<i64>(), -1ll, 0ll, 1ll, Max<i64>())
DEFINE_REPEATED_FIELD(UI32, ui32, 0ul, 1ul, Max<ui32>())
DEFINE_REPEATED_FIELD(UI64, ui64, 0ull, 1ull, Max<ui64>())
DEFINE_REPEATED_FIELD(SI32, i32, Min<i32>(), -1, 0, 1, Max<i32>())
DEFINE_REPEATED_FIELD(SI64, i64, Min<i64>(), -1ll, 0ll, 1ll, Max<i64>())
DEFINE_REPEATED_FIELD(FI32, ui32, 0, 1, Max<ui32>())
DEFINE_REPEATED_FIELD(FI64, ui64, 0ull, 1ull, Max<ui64>())
DEFINE_REPEATED_FIELD(SFI32, i32, Min<i32>(), -1, 0, 1, Max<i32>())
DEFINE_REPEATED_FIELD(SFI64, i64, Min<i64>(), -1ll, 0ll, 1ll, Max<i64>())
DEFINE_REPEATED_FIELD(Bool, bool, false, true)
DEFINE_REPEATED_FIELD(String, TString, "", "Lorem ipsum", "123123")
DEFINE_REPEATED_FIELD(Bytes, TString, "", "מחשב", "\x1")
DEFINE_REPEATED_FIELD(Enum, EEnum, E_1, E_2, E_3)
DEFINE_REPEATED_FIELD(Float, float, 0.0f, 1.0f, 1.123f)
DEFINE_REPEATED_FIELD(Double, double, 0.0, 1.0, 1.123456789012)
DEFINE_REPEATED_FIELD(OneString, TString, "", "Lorem ipsum dolor", "1231231")
DEFINE_REPEATED_FIELD(OneTwoString, TString, "", "Lorem ipsum dolor sit", "12312312")