1df226684Sopenharmony_ci/*
2df226684Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3df226684Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4df226684Sopenharmony_ci * you may not use this file except in compliance with the License.
5df226684Sopenharmony_ci * You may obtain a copy of the License at
6df226684Sopenharmony_ci *
7df226684Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8df226684Sopenharmony_ci *
9df226684Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10df226684Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11df226684Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12df226684Sopenharmony_ci * See the License for the specific language governing permissions and
13df226684Sopenharmony_ci * limitations under the License.
14df226684Sopenharmony_ci */
15df226684Sopenharmony_ci 
16df226684Sopenharmony_ciimport { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType } from '@ohos/hypium'
17df226684Sopenharmony_ciimport { HiLog } from '../../../main/ets/common/HiLog';
18df226684Sopenharmony_ciimport { getFileFd } from '../../../main/ets/common/utils';
19df226684Sopenharmony_ci
20df226684Sopenharmony_ciconst TAG = 'UtilsTest';
21df226684Sopenharmony_ci
22df226684Sopenharmony_ciexport default function utilsTest() {
23df226684Sopenharmony_ci  describe('utilsTest', () => {
24df226684Sopenharmony_ci    it('assertEqual', 0, () => {
25df226684Sopenharmony_ci      let a = 'test'
26df226684Sopenharmony_ci      expect(a).assertEqual('test')
27df226684Sopenharmony_ci    })
28df226684Sopenharmony_ci    /**
29df226684Sopenharmony_ci     * @tc.number: UtilsTest_000
30df226684Sopenharmony_ci     * @tc.name: getFileFd
31df226684Sopenharmony_ci     * @tc.type: TestType.FUNCTION
32df226684Sopenharmony_ci     * @desc: Checking for incorrect URI cannot obtain fd
33df226684Sopenharmony_ci     */
34df226684Sopenharmony_ci    it('UtilsTest_000', TestType.FUNCTION, () => {
35df226684Sopenharmony_ci      HiLog.info(TAG, `UtilsTest_000 it begin`);
36df226684Sopenharmony_ci      let testUri = 'testKey';
37df226684Sopenharmony_ci      let dlpFd = getFileFd(String(testUri))
38df226684Sopenharmony_ci      expect(dlpFd).assertEqual(-1);
39df226684Sopenharmony_ci    })
40df226684Sopenharmony_ci  })
41df226684Sopenharmony_ci}