Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an integration test application #100

Open
Dawoodoz opened this issue Apr 20, 2024 · 4 comments
Open

Create an integration test application #100

Dawoodoz opened this issue Apr 20, 2024 · 4 comments
Assignees
Labels
Future proofing Aiming to work around year 2200 A.C. portability Related to working on a certain operating system

Comments

@Dawoodoz
Copy link
Owner

To simplify porting the media layer in the future, one can have an application that goes through different tests and sais what is good enough in a summary.

Essential integration:

  • Create, load and destroy files in the application's folder. Try to access the same file with absolute and canonical paths. A virtual filesystem can be created in memory if not available.
  • Show colors in random order and ask the developer to name them. Making sure that channels are packed in the correct order and instructing which RGBA pack order to select for the system based on test results.
  • Showing thin lines along the canvas edge and asking the user to say where pixels are flashing, making sure that all pixels on the canvas are visible. A magnifier may be used for high resolution screens.
  • Asking the user to press many objects appearing randomly on the screen, with as much accuracy as possible, detecting if there is a bias or wrong scaling in mouse coordinates.
  • Asking the user to press certain keys. This could be used to automatically suggest remapping between mixed up keys. If physical keys are not available, they can be remapped to alternatives or integrate a virtual keyboard.
  • Allocate and destroy lots of resources and see if there is a memory leak. X11 may cause false detection due to taking ownership of allocated memory, which might be freed after the application terminates.
  • Play sounds from different speakers and ask if they were mapped correctly for mono, stereo, 4.1, 5.1, 7.1, 8.1... This might be more for the end user of a specific sound engine.

Features that might not be possible to integrate in the future:

  • While the left mouse key is essential, additional features should take advantage of right mouse button and scroll wheel.
  • Toggling full screen and asking if it worked. If not possible to change, a system is allowed to always use windowed or full screen, by simply ignoring the request.
  • Asking the user to follow a moving object with the mouse, to check that mouse move events are sent without too much input lag. If hover is not supported, a GUI theme without hover effects needs to be selected for programs.
  • Hiding and showing the cursor.
  • Moving the cursor. Will not work with a stylus pen, because they set the cursor location instead of adjusting it, so relative input (like a mouse) is required to pass this optional feature.
  • Copy text to the clipboard, paste it into a text editor, modify as described, copy and paste back the modified text. When the clipboard is not integrated, a fake clipboard allows copying and pasting text within the same application as a fallback solution, so it is easy to get fooled if not testing together with external applications.
@Dawoodoz Dawoodoz added portability Related to working on a certain operating system Future proofing Aiming to work around year 2200 A.C. labels Apr 20, 2024
@Dawoodoz Dawoodoz self-assigned this May 1, 2024
@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Jun 8, 2024

Tried the new integration test on Windows 11 and it fails with strange bugs. AltGr works, but pressing the Alt key send a mouse event. Pressing F10 also sends a mouse event instead. Scrolling sends garbage data as the cursor location, but that can at least be filtered out by remembering the relative cursor location from the mouse move or click events. There is probably some strange setting that blocks access to Alt and F10 keys.

@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Jun 8, 2024

Two physical keyboards and a virtual keyboard had the same problem with Alt and F10 keys on Windows 11, but F10 works in the file explorer.

@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Jun 8, 2024

After taking Alt and F10 as system keys, the only remaining problem is that AltGr wants to send Ctrl events on MS-Windows. This might be possible to filter away if inspecting all the additional information bits.

@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Jun 9, 2024

Decided to just let Windows send duplicate events for now, because filtering out events would risk making things even more strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Future proofing Aiming to work around year 2200 A.C. portability Related to working on a certain operating system
Projects
None yet
Development

No branches or pull requests

1 participant