From 7507f2116d3f6a7bb6ccf4393565a6cea2069af7 Mon Sep 17 00:00:00 2001 From: zhangfuzhi Date: Fri, 3 Feb 2023 14:10:24 +0800 Subject: [PATCH] new add isNRSuppported Signed-off-by: zhangfuzhi --- .../src/main/ets/test/RadioJsunit.test.ets | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioJsunit.test.ets index 130df9950..612c15679 100644 --- a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioJsunit.test.ets @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -64,17 +64,41 @@ export default function radioJsunit() { * @tc.desc Function test */ it('Telephony_NetworkSearch_isNrSupported_Promise_0400', 0, async function (done) { + let CaseName = "Telephony_NetworkSearch_isNrSupported_Promise_0400 "; try { let result = radio.isNrSupported(); - console.log("Result: " + result); + console.info("Result: " + result); let result0 = radio.isNrSupported(SLOT_0); - console.log("Result0: " + result0); + console.info("Result0: " + result0); + console.info(CaseName + "is complete!"); done(); } catch (err) { - console.log("Telephony_NetworkSearch_isNrSupported_Promise_0400 err" + JSON.stringify(err)); + console.info(CaseName + "err " + JSON.stringify(err)); expect(false).assertTrue(); done(); } }); + + /** + * @tc.number Telephony_NetworkSearch_isNRSupported_Async_0100 + * @tc.name Test The function isNRSupported(soltId) + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_isNRSupported_Async_0100', 0, async function (done) { + let CaseName = "Telephony_NetworkSearch_isNRSupported_Async_0100 "; + try { + let result = radio.isNRSupported(); + console.info("Result: " + result); + let result0 = radio.isNRSupported(SLOT_0); + console.info("Result0: " + result0); + console.info(CaseName + "is complete!"); + done(); + } catch (err) { + console.info(CaseName + "err " + JSON.stringify(err)); + expect(false).assertTrue(); + done(); + } + }); + }) } -- GitLab