• 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 {HeapTreeDataBean} from "../../../dist/trace/bean/HeapTreeDataBean.js"
18
19describe('HeapTreeDataBean Test', ()=>{
20    let heapTreeDataBean  = new HeapTreeDataBean();
21
22    it('HeapTreeDataBeanTest01', function () {
23        heapTreeDataBean = {
24            MoudleName: "MoudleName",
25            AllocationFunction: "AllocationFunction",
26            startTs: 0,
27            endTs: 0,
28            eventType: "eventType",
29            depth: 0,
30            heapSize: 0,
31            eventId: "eventId",
32        }
33        expect(heapTreeDataBean).not.toBeUndefined()
34        expect(heapTreeDataBean).toMatchInlineSnapshot({
35  MoudleName: expect.any(String),
36  AllocationFunction: expect.any(String),
37  startTs: expect.any(Number),
38  endTs: expect.any(Number),
39  eventType: expect.any(String),
40  depth: expect.any(Number),
41  heapSize: expect.any(Number),
42  eventId: expect.any(String) }, `
43Object {
44  "AllocationFunction": Any<String>,
45  "MoudleName": Any<String>,
46  "depth": Any<Number>,
47  "endTs": Any<Number>,
48  "eventId": Any<String>,
49  "eventType": Any<String>,
50  "heapSize": Any<Number>,
51  "startTs": Any<Number>,
52}
53`)
54    });
55})