Skip to content

Add tests for the virtual input #12

@quasilyte

Description

@quasilyte

This is the easiest part of the library to test.

But also, it's a part that may be optimized later: right now it works under an assumption that simulated events are both rare (not happen often) and not numerous. If some game will spam simulated events inside a single frame, we'll end up with big slices. Big slices are an issue for our linear search algorithm.

Maybe we need to do a sorting inside System.Update() method of all current events and do a binary search. For the small number of events, like <10 it won't make much of a difference, but for the 1000+ events it will work much better. But maybe there is even a better solution.

Having tests and benchmarks would make optimizations/refactoring easier there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions