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 waitndk from 'libwaitndk.so' 19 20 21export default function muslWaitNdkTest() { 22 describe('MuslWaitTest', () => { 23 24 beforeEach(async () => { 25 await Utils.sleep(50) 26 }) 27 28 /** 29 * @tc.number : SUB_THIRDPARTY_MUSL_WAIT_WAIT_0100 30 * @tc.name : testMuslWaitWait001 31 * @tc.desc : test wait 32 * @tc.size : MediumTest 33 * @tc.type : Function 34 * @tc.level : Level 1 35 */ 36 it('testMuslWaitWait001', 0, async (done: Function) => { 37 let data: number= waitndk.wait(); 38 expect(data).assertEqual(1); 39 done() 40 }); 41 /** 42 * @tc.number : SUB_THIRDPARTY_MUSL_WAIT_WAIT3_0100 43 * @tc.name : testMuslWaitWait3001 44 * @tc.desc : test wait3 45 * @tc.size : MediumTest 46 * @tc.type : Function 47 * @tc.level : Level 1 48 */ 49 it('testMuslWaitWait3001', 0, async (done: Function) => { 50 let data: number = waitndk.wait3(); 51 expect(data).assertEqual(1); 52 done() 53 }); 54 /** 55 * @tc.number : SUB_THIRDPARTY_MUSL_WAIT_WAIT4_0100 56 * @tc.name : testMuslWaitWait4001 57 * @tc.desc : test wait4 58 * @tc.size : MediumTest 59 * @tc.type : Function 60 * @tc.level : Level 1 61 */ 62 it('testMuslWaitWait4001', 0, async (done: Function) => { 63 let data: number = waitndk.wait4(); 64 expect(data).assertEqual(1); 65 done() 66 }); 67 /** 68 * @tc.number : SUB_THIRDPARTY_MUSL_WAIT_WAITID_0100 69 * @tc.name : testMuslWaitWaitid001 70 * @tc.desc : test waitid 71 * @tc.size : MediumTest 72 * @tc.type : Function 73 * @tc.level : Level 1 74 */ 75 it('testMuslWaitWaitid001', 0, async (done: Function) => { 76 let data: number = waitndk.waitid(); 77 expect(data).assertEqual(1); 78 done() 79 }); 80 /** 81 * @tc.number : SUB_THIRDPARTY_MUSL_WAIT_WAITPID_0100 82 * @tc.name : testMuslWaitWaitpid001 83 * @tc.desc : test waitpid 84 * @tc.size : MediumTest 85 * @tc.type : Function 86 * @tc.level : Level 1 87 */ 88 it('testMuslWaitWaitpid001', 0, async (done: Function) => { 89 let data: number = waitndk.waitpid(); 90 expect(data).assertEqual(1); 91 done() 92 }); 93 }) 94} 95