提交 1cbd3d2c 编写于 作者: Y yuexinyao1

yuexinyao1@huawei.com

Signed-off-by: Nyuexinyao1 <yuexinyao1@huawei.com>
上级 536ce6ad
......@@ -14,7 +14,7 @@
*/
import MultimodalInput_Device_test from './InputDevice.test.js'
import MultimodalInput_KeyCode_test from './MultimodalInputKey_Code.test.js'
import MultimodalInput_KeyCode_test from './MultimodalInput_KeyCode.test.js'
import MultimodalInput_Pointer_test from './Pointer.test.js'
export default function testsuite() {
MultimodalInput_Device_test()
......
......@@ -26,18 +26,18 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestT
export default function MultimodalInputEventTypeTest() {
describe('MultimodalInput_test', function () {
it('MultimodalInput_test::KeyEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::KeyEventTypeTest_0010 enter`);
it('MultimodalInput_KeyEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_KeyEventTypeTest_0010 enter`);
expect(keyEvent.Action.CANCEL == 0).assertTrue();
expect(keyEvent.Action.DOWN == 1).assertTrue();
expect(keyEvent.Action.UP == 2).assertTrue();
console.info(`MultimodalInput_test::KeyEventTypeTest_0010 exit`);
console.info(`MultimodalInput_KeyEventTypeTest_0010 exit`);
})
it('MultimodalInput_test::KeyEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_test::KeyEventTypeTest_0020 enter`);
it('MultimodalInput_KeyEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_KeyEventTypeTest_0020 enter`);
let testKey: Key = { code: inputkeyCode.KeyCode.KEYCODE_FN, pressedTime: 10, deviceId: 1 };
......@@ -45,11 +45,11 @@ export default function MultimodalInputEventTypeTest() {
expect(testKey.pressedTime == 10).assertTrue();
expect(testKey.deviceId == 1).assertTrue();
console.info(`MultimodalInput_test::KeyEventTypeTest_0020 exit`);
console.info(`MultimodalInput_KeyEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::KeyEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_test::KeyEventTypeTest_0030 enter`);
it('MultimodalInput_KeyEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_KeyEventTypeTest_0030 enter`);
let testKey: Key = { code: inputkeyCode.KeyCode.KEYCODE_FN, pressedTime: 10, deviceId: 1 };
let testKeyEvent: KeyEvent = {
......@@ -72,11 +72,11 @@ export default function MultimodalInputEventTypeTest() {
expect(testKeyEvent.numLock).assertTrue();
expect(testKeyEvent.scrollLock).assertTrue();
console.info(`MultimodalInput_test::KeyEventTypeTest_0030 exit`);
console.info(`MultimodalInput_KeyEventTypeTest_0030 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0010 enter`);
it('MultimodalInput_MouseEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0010 enter`);
expect(mouseEvent.Action.CANCEL == 0).assertTrue();
expect(mouseEvent.Action.MOVE == 1).assertTrue();
......@@ -86,92 +86,92 @@ export default function MultimodalInputEventTypeTest() {
expect(mouseEvent.Action.AXIS_UPDATE == 5).assertTrue();
expect(mouseEvent.Action.AXIS_END == 6).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0010 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0010 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.LEFT == 0).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00201', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00201', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.MIDDLE == 1).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00202', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00202', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.RIGHT == 2).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00203', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00203', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.SIDE == 3).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00204', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00204', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.EXTRA == 4).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00205', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00205', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.FORWARD == 5).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00206', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00206', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.BACK == 6).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_00207', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
it('MultimodalInput_MouseEventTypeTest_00207', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0020 enter` + mouseEvent.Button.LEFT + mouseEvent.Button.MIDDLE + mouseEvent.Button.RIGHT + mouseEvent.Button.SIDE +mouseEvent.Button.EXTRA +mouseEvent.Button.BACK + mouseEvent.Button.TASK );
expect(mouseEvent.Button.TASK == 7).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0020 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0030 enter`);
it('MultimodalInput_MouseEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0030 enter`);
expect(mouseEvent.Axis.SCROLL_VERTICAL == 0).assertTrue();
expect(mouseEvent.Axis.SCROLL_HORIZONTAL == 1).assertTrue();
expect(mouseEvent.Axis.PINCH == 2).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0030 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0030 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0040', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0040 enter`);
it('MultimodalInput_MouseEventTypeTest_0040', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0040 enter`);
let testAxisValue: AxisValue = { axis: mouseEvent.Axis.SCROLL_VERTICAL, value: 1 };
expect(testAxisValue.axis == mouseEvent.Axis.SCROLL_VERTICAL).assertTrue();
expect(testAxisValue.value == 1).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0040 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0040 exit`);
})
it('MultimodalInput_test::MouseEventTypeTest_0050', 0, function () {
console.info(`MultimodalInput_test::MouseEventTypeTest_0050 enter`);
it('MultimodalInput_MouseEventTypeTest_0050', 0, function () {
console.info(`MultimodalInput_MouseEventTypeTest_0050 enter`);
let testAxisValue: AxisValue = { axis: mouseEvent.Axis.SCROLL_VERTICAL, value: 1 };
let testMouseEvent: MouseEvent = {
......@@ -202,22 +202,22 @@ export default function MultimodalInputEventTypeTest() {
expect(testMouseEvent.numLock).assertTrue();
expect(testMouseEvent.scrollLock).assertTrue();
console.info(`MultimodalInput_test::MouseEventTypeTest_0050 exit`);
console.info(`MultimodalInput_MouseEventTypeTest_0050 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0010 enter`);
it('MultimodalInput_TouchEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_TouchEventTypeTest_0010 enter`);
expect(touchEvent.Action.CANCEL == 0).assertTrue();
expect(touchEvent.Action.DOWN == 1).assertTrue();
expect(touchEvent.Action.MOVE == 2).assertTrue();
expect(touchEvent.Action.UP == 3).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0010 exit`);
console.info(`MultimodalInput_TouchEventTypeTest_0010 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0020 enter`);
it('MultimodalInput_TouchEventTypeTest_0020', 0, function () {
console.info(`MultimodalInput_TouchEventTypeTest_0020 enter`);
expect(touchEvent.ToolType.FINGER == 0).assertTrue();
expect(touchEvent.ToolType.PEN == 1).assertTrue();
......@@ -228,21 +228,21 @@ export default function MultimodalInputEventTypeTest() {
expect(touchEvent.ToolType.MOUSE == 6).assertTrue();
expect(touchEvent.ToolType.LENS == 7).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0020 exit`);
console.info(`MultimodalInput_TouchEventTypeTest_0020 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0030 enter`);
it('MultimodalInput_TouchEventTypeTest_0030', 0, function () {
console.info(`MultimodalInput_TouchEventTypeTest_0030 enter`);
expect(touchEvent.SourceType.TOUCH_SCREEN == 0).assertTrue();
expect(touchEvent.SourceType.PEN == 1).assertTrue();
expect(touchEvent.SourceType.TOUCH_PAD == 2).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0030 exit`);
console.info(`MultimodalInput_TouchEventTypeTest_0030 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0040', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0040 enter`);
it('MultimodalInput_TouchEventTypeTest_0040', 0, function () {
console.info(`MultimodalInput_TouchEventTypeTest_0040 enter`);
let testTouch: Touch = {
id: 1, pressedTime: 1, screenX: 1, screenY: 1, windowX: 1, windowY: 1, pressure: 1,
......@@ -268,11 +268,11 @@ export default function MultimodalInputEventTypeTest() {
expect(testTouch.rawY == 1).assertTrue();
expect(testTouch.toolType == touchEvent.ToolType.FINGER).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0040 exit`);
console.info(`MultimodalInput_TouchEventTypeTest_0040 exit`);
})
it('MultimodalInput_test::TouchEventTypeTest_0050', 0, function () {
console.info(`MultimodalInput_test::TouchEventTypeTest_0050 enter`);
it('MultimodalInput_TouchEventTypeTest_0050', 0, function () {
console.info(`MultimodalInput_TouchEventTypeTest_0050 enter`);
let testTouch: Touch = {
id: 1, pressedTime: 1, screenX: 1, screenY: 1, windowX: 1, windowY: 1, pressure: 1,
......@@ -289,11 +289,11 @@ export default function MultimodalInputEventTypeTest() {
expect(testTouchEvent.touches[0].id == 1).assertTrue();
expect(testTouchEvent.sourceType == touchEvent.SourceType.TOUCH_SCREEN).assertTrue();
console.info(`MultimodalInput_test::TouchEventTypeTest_0050 exit`);
console.info(`MultimodalInput_TouchEventTypeTest_0050 exit`);
})
it('MultimodalInput_test::InputEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_test::InputEventTypeTest_0010 enter`);
it('MultimodalInput_InputEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_InputEventTypeTest_0010 enter`);
let testInputEvent = {id: 1, deviceId: 1, actionTime: 1, screenId: 1, windowId: 1};
expect(testInputEvent.id == 1).assertTrue();
expect(testInputEvent.deviceId == 1).assertTrue();
......@@ -301,7 +301,7 @@ export default function MultimodalInputEventTypeTest() {
expect(testInputEvent.screenId == 1).assertTrue();
expect(testInputEvent.windowId == 1).assertTrue();
console.info(`MultimodalInput_test::InputEventTypeTest_0010 exit`);
console.info(`MultimodalInput_InputEventTypeTest_0010 exit`);
})
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册