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 */ 15import { SpFileSystem } from '../../../../src/trace/component/setting/SpFileSystem'; 16 17describe('spFileSystem Test', () => { 18 let spFileSystem = new SpFileSystem(); 19 it('SpFileSystemTest01', function () { 20 spFileSystem.startSamp = true; 21 expect(spFileSystem.startSamp).toBeTruthy(); 22 }); 23 24 it('SpFileSystemTest02', function () { 25 spFileSystem.startSamp = false; 26 expect(spFileSystem.startSamp).toBeFalsy(); 27 }); 28 29 it('SpFileSystemTest03', function () { 30 expect(spFileSystem.getSystemConfig()).toStrictEqual({ 31 process: '', 32 unWindLevel: 10, 33 }); 34 }); 35 36 it('SpFileSystemTest04', function () { 37 expect(spFileSystem.unDisable()).toBeUndefined(); 38 }); 39 40 it('SpFileSystemTest05', function () { 41 expect(spFileSystem.disable()).toBeUndefined(); 42 }); 43 44 it('SpFileSystemTest07', function () { 45 spFileSystem.startRecord = true; 46 expect(spFileSystem.startRecord).toBeTruthy(); 47 }); 48 49 it('SpFileSystemTest08', function () { 50 spFileSystem.startRecord = false; 51 expect(spFileSystem.startRecord).toBeFalsy(); 52 }); 53 54 it('SpFileSystemTest09', function () { 55 spFileSystem.startFileSystem = true; 56 expect(spFileSystem.startFileSystem).toBeTruthy(); 57 }); 58 59 it('SpFileSystemTest10', function () { 60 spFileSystem.startFileSystem = false; 61 expect(spFileSystem.startFileSystem).toBeFalsy(); 62 }); 63 64 it('SpFileSystemTest11', function () { 65 spFileSystem.startVirtualMemory = true; 66 expect(spFileSystem.startVirtualMemory).toBeTruthy(); 67 }); 68 69 it('SpFileSystemTest12', function () { 70 spFileSystem.startVirtualMemory = false; 71 expect(spFileSystem.startVirtualMemory).toBeFalsy(); 72 }); 73 74 it('SpFileSystemTest13', function () { 75 spFileSystem.startIo = true; 76 expect(spFileSystem.startIo).toBeTruthy(); 77 }); 78 79 it('SpFileSystemTest14', function () { 80 spFileSystem.startIo = false; 81 expect(spFileSystem.startIo).toBeFalsy(); 82 }); 83}); 84