1/* 2 * Copyright (C) 2024 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 */ 15import { BinderGroup, CycleBinderItem, FuncNameCycle, FunctionItem } from '../../../src/trace/bean/BinderProcessThread'; 16describe('BinderProcessThread', () => { 17 it('test BinderProcessThread 01', () => { 18 let data = new CycleBinderItem(); 19 data.tid = 10; 20 expect(data.tid).toEqual(10); 21 }); 22 it('test BinderProcessThread 02', () => { 23 let data = new FuncNameCycle(); 24 data.tid = 10; 25 expect(data.tid).toEqual(10); 26 }); 27 it('test BinderProcessThread 03', () => { 28 let data: FunctionItem = { cycleStartTime: 10, cycleDur: 10, dur: 10, id: 10, tid: 10, pid: 10 }; 29 expect(data.tid).toEqual(10); 30 }); 31 it('test BinderProcessThread 04', () => { 32 let data: BinderGroup = { 33 title: '10', 34 totalCount: 10, 35 binderAsyncRcvCount: 10, 36 binderReplyCount: 10, 37 binderTransactionAsyncCount: 10, 38 binderTransactionCount: 10, 39 tid: 10, 40 pid: 10, 41 }; 42 expect(data.tid).toEqual(10); 43 }); 44 it('test BinderProcessThread 05', () => { 45 let data: CycleBinderItem = { 46 title: '10', 47 durNs: 10, 48 tsNs: 10, 49 cycleDur: 10, 50 cycleStartTime: 10, 51 totalCount: 10, 52 tid: 10, 53 pid: 10, 54 binderTransactionCount: 10, 55 binderAsyncRcvCount: 10, 56 binderReplyCount: 10, 57 binderTransactionAsyncCount: 10, 58 idx: 10, 59 type: 'fds', 60 }; 61 expect(data.tid).toEqual(10); 62 }); 63}); 64