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 { 16 CycleDataBean, 17 GpuCountBean, 18 SearchGpuFuncBean, 19 TreeDataBean, 20 TreeDataStringBean, 21 } from '../../../src/trace/bean/GpufreqBean'; 22 describe('GpuCountBean', () => { 23 it('test GpuCountBean 01', () => { 24 let data = new GpuCountBean(0, 0, 0, 0, 0, 0, '0', 0); 25 expect(data.freq).toEqual(0); 26 }); 27 28 it('test GpuCountBean 02', () => { 29 let data = new SearchGpuFuncBean(); 30 data.startTime = 4; 31 expect(data.startTime).toEqual(4); 32 }); 33 34 it('test GpuCountBean 03', () => { 35 let data = new TreeDataBean(); 36 data.startTime = 4; 37 expect(data.startTime).toEqual(4); 38 }); 39 40 it('test GpuCountBean 04', () => { 41 let data = new CycleDataBean(0, 0, 0, 0, 0, '0', 0); 42 expect(data.colorIndex).toEqual(0); 43 }); 44 45 it('test GpuCountBean 05', () => { 46 let data = new TreeDataStringBean('0', '0', '0', '0', '0', '0', 0); 47 expect(data.thread).toEqual('0'); 48 }); 49 });