1/* 2 * Copyright (c) 2023 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 16import { beforeEach, describe, expect, it } from '@ohos/hypium' 17import Utils from './Utils' 18import ftw from 'libftw1ndk.so' 19 20export default function ftwNdk1Test() { 21 describe('MuslFtw1Test', () => { 22 23 beforeEach(async () => { 24 await Utils.sleep(50) 25 }) 26 27 /** 28 * @tc.number : SUB_THIRDPARTY_MUSL_FTW_FTW_0200 29 * @tc.name : testMuslFtwFtw002 30 * @tc.desc : test ftw 31 * @tc.size : MediumTest 32 * @tc.type : Function 33 * @tc.level : Level 1 34 */ 35 it('testMuslFtwFtw002', 0, async (done: Function) => { 36 let result: number = ftw.ftw(-1); 37 expect(result).assertEqual(-1); 38 done() 39 }); 40 41 /** 42 * @tc.number : SUB_THIRDPARTY_MUSL_FTW_FTW64_0200 43 * @tc.name : testMuslFtwFtw64002 44 * @tc.desc : test ftw64 45 * @tc.size : MediumTest 46 * @tc.type : Function 47 * @tc.level : Level 1 48 */ 49 it('testMuslFtwFtw64002', 0, async (done: Function) => { 50 let result: number = ftw.ftw64(-1); 51 expect(result).assertEqual(-1); 52 done() 53 }); 54 55 /** 56 * @tc.number : SUB_THIRDPARTY_MUSL_FTW_NFTW_0200 57 * @tc.name : testMuslFtwNftw002 58 * @tc.desc : nftw 59 * @tc.size : MediumTest 60 * @tc.type : Function 61 * @tc.level : Level 1 62 */ 63 it('testMuslFtwNftw002', 0, async (done: Function) => { 64 let result: number = ftw.nftw(-1); 65 expect(result).assertEqual(-1); 66 done() 67 }); 68 69 /** 70 * @tc.number : SUB_THIRDPARTY_MUSL_FTW_NFTW64_0200 71 * @tc.name : testMuslFtwNftw64002 72 * @tc.desc : nftw64 73 * @tc.size : MediumTest 74 * @tc.type : Function 75 * @tc.level : Level 1 76 */ 77 it('testMuslFtwNftw64002', 0, async (done: Function) => { 78 let result: number = ftw.nftw64(-1); 79 expect(result).assertEqual(-1); 80 done() 81 }); 82 }) 83}