3 * Copyright 2019 AT&T Intellectual Property
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
24 #include <x2reset_response_wrapper.h>
26 void test_build_pack_x2reset_response();
27 void test_unpack(void);
30 main(int argc, char* argv[])
32 test_build_pack_x2reset_response();
36 void test_build_pack_x2reset_response(){
37 size_t error_buf_size = 8192;
38 size_t packed_buf_size = 4096;
39 unsigned char responseDataBuf[packed_buf_size];
40 char responseErrorBuf[error_buf_size];
41 bool result = build_pack_x2reset_response(&packed_buf_size, responseDataBuf, error_buf_size, responseErrorBuf);
44 printf("#test_build_pack_x2reset_response failed. Packing error %s\n", responseErrorBuf);
47 printf("x2reset response packed size:%lu\nPayload:\n", packed_buf_size);
48 for (size_t i = 0; i < packed_buf_size; ++i)
49 printf("%02x",responseDataBuf[i]);