• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16// @ts-ignore
17import { PayloadHead } from '../../../dist/hdc/message/PayloadHead.js';
18
19describe('PayloadHead Test', () => {
20  let payloadHead = new PayloadHead();
21  it('PayloadHeadTest01', function () {
22    expect(payloadHead).not.toBeUndefined();
23  });
24
25  it('PayloadHeadTest02', function () {
26    expect(payloadHead.flag).toBeUndefined();
27  });
28
29  it('PayloadHeadTest03', function () {
30    payloadHead.flag = true;
31    expect(payloadHead.flag).toBeTruthy();
32  });
33
34  it('PayloadHeadTest04', function () {
35    expect(payloadHead.reserve).toBeUndefined();
36  });
37
38  it('PayloadHeadTest05', function () {
39    payloadHead.reserve = true;
40    expect(payloadHead.reserve).toBeTruthy();
41  });
42
43  it('PayloadHeadTest06', function () {
44    expect(payloadHead.protocolVer).toBeUndefined();
45  });
46
47  it('PayloadHeadTest07', function () {
48    payloadHead.protocolVer = true;
49    expect(payloadHead.protocolVer).toBeTruthy();
50  });
51
52  it('PayloadHeadTest08', function () {
53    expect(payloadHead.headSize).toBeUndefined();
54  });
55
56  it('PayloadHeadTest9', function () {
57    payloadHead.headSize = true;
58    expect(payloadHead.headSize).toBeTruthy();
59  });
60
61  it('PayloadHeadTest10', function () {
62    expect(payloadHead.dataSize).toBeUndefined();
63  });
64
65  it('PayloadHeadTest11', function () {
66    payloadHead.dataSize = true;
67    expect(payloadHead.dataSize).toBeTruthy();
68  });
69
70  it('PayloadHeadTest12', function () {
71    expect(payloadHead.toString()).toBeTruthy();
72  });
73
74  it('PayloadHeadTest13', function () {
75    expect(payloadHead.getPayloadHeadLength).toBe(undefined);
76  });
77});
78