aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Be consistent in including config.hPierre Ossman2021-12-307-0/+28
| | | | | | The generally recommended way is to include it from source files, not headers. We had a mix of both. Let's try to be consistent and follow the recommended way.
* Correctly handle invalid UTF-16 code pointsPierre Ossman2020-10-051-0/+2
| | | | | Some code points are reserved for the UTF-16 coding itself and must not appear as input data to the algorithm.
* Fix conversion of latin-1 to UTF-8Pierre Ossman2020-10-051-0/+34
| | | | Signed bug prevented anything not ASCII from being coded correctly.
* Fix UTF-16 encoding/decoding of high code pointsPierre Ossman2020-10-051-0/+4
| | | | | Everything outside of BMP was handled incorrectly and was coded as completely different code points.
* Return the correct number of consumed UTF-8 bytesPierre Ossman2020-10-052-0/+168
| | | | | | | | This would mess up most conversions from UTF-8 as the caller wouldn't know how far to step to get to the next valid character, resulting in markers for invalid data to be injected here and there. Also add some unit tests to avoid this reoccurring.
* Update gesture unit test to cover angle cornercaseSamuel Mannehed2020-06-151-3/+3
| | | | | | If the difference in angle is larger than 180 degrees we hit a corner case. This commit modifies the coordinates of an existing test to cover this.
* Improve names of many gesturehandler unit testsSamuel Mannehed2020-06-051-24/+24
| | | | Makes it easier to understand what the tests do.
* Remove unnecessary touchEnd from unit testsSamuel Mannehed2020-06-051-1/+0
|
* Implement touch gesture handling on UnixAaron Sowry2020-05-292-0/+1248
| | | | | Allows the user to perform certain important mouse operations using touch gestures instead.
* Fix position for click and drag with EmulateMBAlex Tanskanen2020-05-261-2/+60
| | | | | | | If you have the setting "Emulate middle mouse button" turned on, a click and drag can fail if it is done very quickly. The position of the initial click will be incorrect in such a case because the timeout will delay events.
* Add unit tests for EmulateMBAlex Tanskanen2020-05-262-0/+433
|
* Handle pixel formats with odd shift valuesPierre Ossman2019-11-151-0/+6
| | | | | | | | | Our fast paths assume that each channel fits in to a separate byte. That means the shift needs to be a multiple of 8. Start actually checking this so that a client cannot trip us up and possibly cause incorrect code exection. Issue found by Pavel Cheremushkin from Kaspersky Lab.
* Add unit tests for PixelFormat.is888() detectionPierre Ossman2019-11-151-1/+59
|
* Add sanity checks for PixelFormat shift valuesPierre Ossman2019-11-151-0/+6
| | | | | | | | | | | | Otherwise we might be tricked in to reading and writing things at incorrect offsets for pixels which ultimately could result in an attacker writing things to the stack or heap and executing things they shouldn't. This only affects the server as the client never uses the pixel format suggested by th server. Issue found by Pavel Cheremushkin from Kaspersky Lab.
* Fix depth sanity test in PixelFormatPierre Ossman2019-11-151-0/+4
|
* Add unit test for PixelFormat sanity checksPierre Ossman2019-11-152-0/+117
|
* Add unit tests for convertLF() and convertCRLF()Pierre Ossman2019-09-252-0/+127
|
* Split test programs to benchmarking and unit testsPierre Ossman2019-09-253-0/+448
They have very different purpose, so make things easier to work with by having multiple directories.