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 { SpRecordPerf } from '../../../../dist/trace/component/setting/SpRecordPerf.js'; 18 19describe('SpRecordPerf Test', () => { 20 let spRecordPerf = new SpRecordPerf(); 21 it('SpRecordPerfTest01', function () { 22 expect(spRecordPerf).not.toBeUndefined(); 23 }); 24 25 it('SpRecordPerfTest02', function () { 26 expect(spRecordPerf.show).toBeFalsy(); 27 }); 28 29 it('SpRecordPerfTest03', function () { 30 spRecordPerf.show = true; 31 expect(spRecordPerf.show).toBeTruthy(); 32 }); 33 34 it('SpRecordPerfTest08', function () { 35 spRecordPerf.show = false; 36 expect(spRecordPerf.show).toBeFalsy(); 37 }); 38 39 it('SpRecordPerfTest09', function () { 40 expect(spRecordPerf.startSamp).toBeFalsy(); 41 }); 42 43 it('SpRecordPerfTest10', function () { 44 spRecordPerf.startSamp = true; 45 expect(spRecordPerf.startSamp).toBeTruthy(); 46 }); 47 48 it('SpRecordPerfTest11', function () { 49 spRecordPerf.startSamp = false; 50 expect(spRecordPerf.startSamp).toBeFalsy(); 51 }); 52 53 it('SpRecordPerfTest05', function () { 54 expect(spRecordPerf.unDisable()).toBeUndefined(); 55 }); 56 57 it('SpRecordPerfTest06', function () { 58 expect(spRecordPerf.startSamp).toBeFalsy(); 59 }); 60 61 it('SpRecordPerfTest07', function () { 62 spRecordPerf.startSamp = true; 63 expect(spRecordPerf.startSamp).toBeTruthy(); 64 }); 65}); 66