-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_pack.cpp
60 lines (55 loc) · 1.32 KB
/
test_pack.cpp
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
/*
This file is part of cpp_ssz.
@author SigmoiD <alphabet@hotmail.co.kr>
*/
#include "include/Common.h"
#include "include/cpp_ssz_bool.h"
#include "include/cpp_ssz_uint.h"
#include "include/cpp_ssz_bytes.h"
#include "include/cpp_ssz_bytesN.h"
#include "include/cpp_ssz_list.h"
#include "include/cpp_ssz_vector.h"
#include "include/cpp_ssz_container.h"
#include "include/cpp_ssz_util.h"
using namespace std;
using namespace ssz;
#include "include/test.h"
int main()
{
{
List<Bool> testval;
Bool a0(true);
Bool a1(false);
Bool a2(true);
Bool a3(false);
testval.push_back(a0);
testval.push_back(a1);
testval.push_back(a2);
testval.push_back(a3);
bytes packed = pack(testval);
print_hex(packed);
}
{
List<uint8> testval;
uint8 a0(1);
uint8 a1(2);
uint8 a2(3);
uint8 a3(4);
testval.push_back(a0);
testval.push_back(a1);
testval.push_back(a2);
testval.push_back(a3);
bytes packed = pack(testval);
print_hex(packed);
}
{
List<uint16> testval;
uint16 a0(1);
uint16 a1(2);
testval.push_back(a0);
testval.push_back(a1);
bytes packed = pack(testval);
print_hex(packed);
}
return 0;
}