diff --git a/graphic/crossplatform/graphicDisplayetstest/src/main/ets/test/Display.test.ets b/graphic/crossplatform/graphicDisplayetstest/src/main/ets/test/Display.test.ets index eeaefc87a7d6f5f10817555de8c9af0f5d29d9bc..a352ad1b501601e5601c80c909c1c572d2a84ba1 100644 --- a/graphic/crossplatform/graphicDisplayetstest/src/main/ets/test/Display.test.ets +++ b/graphic/crossplatform/graphicDisplayetstest/src/main/ets/test/Display.test.ets @@ -41,19 +41,16 @@ export default function DisplayTest() { console.info('displayTest getDefaultDisplaySyncTest1 begin'); try { var dsp = display.getDefaultDisplaySync(); + console.error('getDefaultDisplaySync message ' + JSON.stringify(dsp)); + console.log("testGetDefaultDisplaySync001 1"); expect(dsp.id != null).assertTrue(); - expect(dsp.refreshRate != null).assertTrue(); + console.log("testGetDefaultDisplaySync001 2"); expect(dsp.width != null).assertTrue(); + console.log("testGetDefaultDisplaySync001 3"); expect(dsp.height != null).assertTrue(); - expect(dsp.rotation != null).assertTrue(); - expect(dsp.densityDPI != null).assertTrue(); - expect(dsp.name != null).assertTrue(); - expect(dsp.alive).assertTrue(); - expect(dsp.state != null).assertTrue(); - expect(dsp.densityPixels != null).assertTrue(); - expect(dsp.scaledDensity != null).assertTrue(); - expect(dsp.xDPI != null).assertTrue(); - expect(dsp.yDPI != null).assertTrue(); + console.log("testGetDefaultDisplaySync001 4"); + expect(dsp.orientation != null).assertTrue(); + console.log("testGetDefaultDisplaySync001 5"); done(); } catch (err) { console.error('getDefaultDisplaySyncTest1 error ' + JSON.stringify(err)); @@ -72,10 +69,15 @@ export default function DisplayTest() { */ it('testDisplay_Orientation001', 0, async function (done) { var dsp = display.getDefaultDisplaySync(); + console.log("testDisplay_Orientation001 1"); expect(dsp.id != null).assertTrue(); + console.log("testDisplay_Orientation001 2"); expect(dsp.width != null).assertTrue(); + console.log("testDisplay_Orientation001 3"); expect(dsp.height != null).assertTrue(); + console.log("testDisplay_Orientation001 4"); expect(dsp.orientation != null).assertTrue(); + console.log("testDisplay_Orientation001 5"); done(); }); @@ -89,10 +91,15 @@ export default function DisplayTest() { */ it('testOrientation001', 0, async function (done) { var dsp = display.getDefaultDisplaySync(); - expect(dsp.orientation == 0).assertTrue(); - expect(dsp.orientation != 1).assertTrue(); - expect(dsp.orientation != 2).assertTrue(); - expect(dsp.orientation != 3).assertTrue(); + console.log("testOrientation001 1...orientation:" + dsp.orientation); + expect(dsp.orientation == 0).assertTrue(); + console.log("testOrientation001 2"); + expect(dsp.orientation != 1).assertTrue(); + console.log("testOrientation001 3"); + expect(dsp.orientation != 2).assertTrue(); + console.log("testOrientation001 4"); + expect(dsp.orientation != 3).assertTrue(); + console.log("testOrientation001 5"); done(); });