Files
Terminal.Gui/UnitTests
Tonttu e24bd67658 Rune extensions micro-optimizations (#3910)
* Add benchmarks for potentially optimizable RuneExtensions

* Add new RuneExtensions.DecodeSurrogatePair benchmark implementation

Avoids intermediate heap array allocations which is especially nice when the rune is not surrogate pair because then array heap allocations are completely avoided.

* Enable nullable reference types in RuneExtensions

* Make RuneExtensions.MaxUnicodeCodePoint readonly

Makes sure no one can accidentally change the value. Ideally would be const value.

* Optimize RuneExtensions.DecodeSurrogatePair

* Remove duplicate Rune.GetUnicodeCategory call

* Add new RuneExtensions.IsSurrogatePair benchmark implementation

Avoids intermediate heap allocations by using stack allocated buffer.

* Optimize RuneExtensions.IsSurrogatePair

* Add RuneExtensions.GetEncodingLength tests

* Optimize RuneExtensions.GetEncodingLength

* Optimize RuneExtensions.Encode

* Print encoding name in benchmark results

* Rename variable to better match return description

* Add RuneExtensions.EncodeSurrogatePair benchmark

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2025-02-25 09:42:32 -07:00
..
2024-12-08 13:40:32 -08:00
2024-11-26 10:18:14 -07:00
2024-12-07 14:37:17 -08:00
2024-11-26 10:18:14 -07:00
2024-12-09 22:03:40 -08:00
2024-09-23 13:58:02 -06:00
2024-12-09 22:03:40 -08:00
2024-11-26 10:18:14 -07:00
2024-09-03 10:55:57 -06:00

Automated Unit Tests

Terminal.Gui uses xunit for automated unit tests run automatically with Github Actions.

See the Testing wiki for details on how to add more tests.