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 stdioext1 from 'libstdioextndk1.so' 19 20export default function muslStdioExt1Test() { 21 describe('MuslStdioExt1Test', () => { 22 23 beforeEach(async () => { 24 await Utils.sleep(50) 25 }) 26 27 /** 28 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FBUF_SIZE_0100 29 * @tc.name : testMuslStdioExtfBufSize001 30 * @tc.desc : test __fbufsize 31 * @tc.size : MediumTest 32 * @tc.type : Function 33 * @tc.level : Level 0 34 */ 35 it('testMuslStdioExtfBufSize001', 0, async (done: Function) => { 36 expect(stdioext1.fBufSize_One()).assertEqual(1); 37 done() 38 }); 39 40 /** 41 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FBUF_SIZE_0200 42 * @tc.name : testMuslStdioExtfBufSize002 43 * @tc.desc : test __fbufsize 44 * @tc.size : MediumTest 45 * @tc.type : Function 46 * @tc.level : Level 0 47 */ 48 it('testMuslStdioExtfBufSize002', 0, async (done: Function) => { 49 expect(stdioext1.fBufSize_Two()).assertEqual(1); 50 done() 51 }); 52 53 /** 54 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FLBF_0100 55 * @tc.name : testMuslStdioExtFLbf001 56 * @tc.desc : test __flbf 57 * @tc.size : MediumTest 58 * @tc.type : Function 59 * @tc.level : Level 0 60 */ 61 it('testMuslStdioExtFLbf001', 0, async (done: Function) => { 62 expect(stdioext1.fLbf_One()).assertEqual(1); 63 done() 64 }); 65 66 /** 67 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FLBF_0200 68 * @tc.name : testMuslStdioExtFLbf002 69 * @tc.desc : test __flbf 70 * @tc.size : MediumTest 71 * @tc.type : Function 72 * @tc.level : Level 0 73 */ 74 it('testMuslStdioExtFLbf002', 0, async (done: Function) => { 75 expect(stdioext1.fLbf_Two()).assertEqual(0); 76 done() 77 }); 78 79 /** 80 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FLBF_0300 81 * @tc.name : testMuslStdioExtFLbf003 82 * @tc.desc : test __flbf 83 * @tc.size : MediumTest 84 * @tc.type : Function 85 * @tc.level : Level 0 86 */ 87 it('testMuslStdioExtFLbf003', 0, async (done: Function) => { 88 expect(stdioext1.fLbf_Three()).assertEqual(0); 89 done() 90 }); 91 92 /** 93 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FPENDING_0100 94 * @tc.name : testMuslStdioExtFPending001 95 * @tc.desc : test __fpending 96 * @tc.size : MediumTest 97 * @tc.type : Function 98 * @tc.level : Level 0 99 */ 100 it('testMuslStdioExtFPending001', 0, async (done: Function) => { 101 expect(stdioext1.fPending_One()).assertLarger(0); 102 done() 103 }); 104 105 /** 106 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FPENDING_0200 107 * @tc.name : testMuslStdioExtFPending002 108 * @tc.desc : test __fpending 109 * @tc.size : MediumTest 110 * @tc.type : Function 111 * @tc.level : Level 0 112 */ 113 it('testMuslStdioExtFPending002', 0, async (done: Function) => { 114 expect(stdioext1.fPending_Two()).assertEqual(0); 115 done() 116 }); 117 118 /** 119 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FPURGE_0100 120 * @tc.name : testMuslStdioExtFPurge001 121 * @tc.desc : test __fpurge 122 * @tc.size : MediumTest 123 * @tc.type : Function 124 * @tc.level : Level 0 125 */ 126 it('testMuslStdioExtFPurge001', 0, async (done: Function) => { 127 expect(stdioext1.fPurge_One()).assertEqual(0); 128 done() 129 }); 130 131 /** 132 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FREADABLE_0100 133 * @tc.name : testMuslStdioExtFReadable001 134 * @tc.desc : test __freadable 135 * @tc.size : MediumTest 136 * @tc.type : Function 137 * @tc.level : Level 0 138 */ 139 it('testMuslStdioExtFReadable001', 0, async (done: Function) => { 140 expect(stdioext1.fReadable_One()).assertEqual(0); 141 done() 142 }); 143 144 /** 145 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FREADABLE_0200 146 * @tc.name : testMuslStdioExtFReadable002 147 * @tc.desc : test __freadable 148 * @tc.size : MediumTest 149 * @tc.type : Function 150 * @tc.level : Level 0 151 */ 152 it('testMuslStdioExtFReadable002', 0, async (done: Function) => { 153 expect(stdioext1.fReadable_Two()).assertEqual(0); 154 done() 155 }); 156 157 /** 158 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FREADING_0100 159 * @tc.name : testMuslStdioExtFReading001 160 * @tc.desc : test __freading 161 * @tc.size : MediumTest 162 * @tc.type : Function 163 * @tc.level : Level 0 164 */ 165 it('testMuslStdioExtFReading001', 0, async (done: Function) => { 166 expect(stdioext1.fReading_One()).assertEqual(0); 167 done() 168 }); 169 170 /** 171 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FREADING_0200 172 * @tc.name : testMuslStdioExtFReading002 173 * @tc.desc : test __freading 174 * @tc.size : MediumTest 175 * @tc.type : Function 176 * @tc.level : Level 0 177 */ 178 it('testMuslStdioExtFReading002', 0, async (done: Function) => { 179 expect(stdioext1.fReading_Two()).assertEqual(0); 180 done() 181 }); 182 183 /** 184 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FSETERR_0100 185 * @tc.name : testMuslStdioExtFSetErr001 186 * @tc.desc : test __fseterr 187 * @tc.size : MediumTest 188 * @tc.type : Function 189 * @tc.level : Level 0 190 */ 191 it('testMuslStdioExtFSetErr001', 0, async (done: Function) => { 192 expect(stdioext1.fSetErr()).assertEqual(1); 193 done() 194 }); 195 196 /** 197 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FWRITABLE_0100 198 * @tc.name : testMuslStdioExtFWritable001 199 * @tc.desc : test __fwritable 200 * @tc.size : MediumTest 201 * @tc.type : Function 202 * @tc.level : Level 0 203 */ 204 it('testMuslStdioExtFWritable001', 0, async (done: Function) => { 205 expect(stdioext1.fWritable_One()).assertEqual(0); 206 done() 207 }); 208 209 /** 210 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FWRITABLE_0200 211 * @tc.name : testMuslStdioExtFWritable002 212 * @tc.desc : test __fwritable 213 * @tc.size : MediumTest 214 * @tc.type : Function 215 * @tc.level : Level 0 216 */ 217 it('testMuslStdioExtFWritable002', 0, async (done: Function) => { 218 expect(stdioext1.fWritable_Two()).assertEqual(0); 219 done() 220 }); 221 222 /** 223 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FWRITING_0100 224 * @tc.name : testMuslStdioExtFWriting001 225 * @tc.desc : test __fwriting 226 * @tc.size : MediumTest 227 * @tc.type : Function 228 * @tc.level : Level 0 229 */ 230 it('testMuslStdioExtFWriting001', 0, async (done: Function) => { 231 expect(stdioext1.fWriting_One()).assertEqual(0); 232 done() 233 }); 234 235 /** 236 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FWRITING_0200 237 * @tc.name : testMuslStdioExtFWriting002 238 * @tc.desc : test __fwriting 239 * @tc.size : MediumTest 240 * @tc.type : Function 241 * @tc.level : Level 0 242 */ 243 it('testMuslStdioExtFWriting002', 0, async (done: Function) => { 244 expect(stdioext1.fWriting_Two()).assertEqual(0); 245 done() 246 }); 247 248 /** 249 * @tc.number : SUB_THIRDPARTY_MUSL_STDIO_EXT_FLUSH_LBF_0100 250 * @tc.name : testMuslStdioExtFlushLbf001 251 * @tc.desc : test _flushlbf 252 * @tc.size : MediumTest 253 * @tc.type : Function 254 * @tc.level : Level 0 255 */ 256 it('testMuslStdioExtFlushLbf001', 0, async (done: Function) => { 257 expect(stdioext1.flushLbf()).assertEqual(0); 258 done() 259 }); 260 }) 261} 262