From a5da43a82b76beaba73ade41e0b0aa662f11fddf Mon Sep 17 00:00:00 2001 From: zhoulisheng1 Date: Fri, 5 May 2023 18:02:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=E8=83=BD?= =?UTF-8?q?=E5=8A=9B=E7=9A=84=E9=83=A8=E5=88=86=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoulisheng1 --- entry/src/ohosTest/ets/test/List.test.ets | 2 ++ entry/src/ohosTest/ets/test/imageknife.ets | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/entry/src/ohosTest/ets/test/List.test.ets b/entry/src/ohosTest/ets/test/List.test.ets index 6d232b7..d83a7d3 100644 --- a/entry/src/ohosTest/ets/test/List.test.ets +++ b/entry/src/ohosTest/ets/test/List.test.ets @@ -17,6 +17,7 @@ import lruCacheTest from './lrucache' import LogUtilTest from './logutil' import Transform from './transfrom' import RequestOptionTest from './requestoption' +import ImageKnifeTest from './imageknife' export default function testsuite() { abilityTest() @@ -24,4 +25,5 @@ export default function testsuite() { LogUtilTest() Transform() RequestOptionTest() + ImageKnifeTest(); } \ No newline at end of file diff --git a/entry/src/ohosTest/ets/test/imageknife.ets b/entry/src/ohosTest/ets/test/imageknife.ets index 11527f8..f931033 100644 --- a/entry/src/ohosTest/ets/test/imageknife.ets +++ b/entry/src/ohosTest/ets/test/imageknife.ets @@ -16,8 +16,8 @@ import hilog from '@ohos.hilog'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import {ImageKnife,ImageKnifeDrawFactory} from '@ohos/imageknife' -export default function LogUtilTest() { - describe('LogUtilTest', function () { +export default function ImageKnifeTest() { + describe('ImageKnifeTest', function () { // Defines a test suite. Two parameters are supported: test suite name and test suite function. beforeAll(function () { // Presets an action, which is performed only once before all test cases of the test suite start. @@ -42,7 +42,7 @@ export default function LogUtilTest() { it('TestGlobalImageKnife',0, function () { expect(globalThis.ImageKnife).assertEqual(undefined) globalThis.ImageKnife = ImageKnife.with(getContext()) - expect((globalThis.ImageKnife == undefined)).assertFalse() + expect(globalThis.ImageKnife).not().assertUndefined() }) @@ -50,12 +50,9 @@ export default function LogUtilTest() { globalThis.ImageKnife = ImageKnife.with(getContext()) globalThis.ImageKnife.setDefaultLifeCycle(ImageKnifeDrawFactory.createProgressLifeCycle("#10a5ff", 0.5)) let globalLifeCycle = globalThis.ImageKnife.getDefaultLifeCycle(); - expect(globalLifeCycle == undefined).assertFalse(); + expect(globalLifeCycle).not().assertUndefined() }) - it('TestGlobalCacheKey',2, function () { - - })