summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common
AgeCommit message (Collapse)Author
2025-11-09Common: Add a DirectIOFile class that allows for copies which are entirely ↵Jordan Woyak
thread safe.
2025-11-08Merge pull request #14020 from jordan-woyak/string-util-cleanupsJosJuice
StringUtil: Cleanups and add some character encoding conversion unit tests.
2025-11-02Common: Add AtomicMutex and SpinMutex classes as faster alternatives to ↵Jordan Woyak
std::mutex.
2025-11-02UnitTests: Add some StringUtil character encoding conversion tests.Jordan Woyak
2025-10-08Jit64: Dynamic length of regular jump instruction (for known addresses)Martino Fontana
Conditional jumps already do that, so let's be consistent.
2025-09-17Merge pull request #13874 from sepalani/bitcast-ptrJMC47
Common/BitUtils: Add operator[] to BitCastPtrType
2025-08-27MathUtil: Simplify SaturatingCast implementation with ↵Jordan Woyak
std::cmp_less/cmp_greater and fix a floating point edge case. Thanks to Dentomologist for catching the edge case.
2025-08-18Common/BitUtils: Add operator[] to BitCastPtrTypeSepalani
2025-08-04Qt: Better wayland detection to enforce xcbJoshua Vandaële
In certain cases, the platform can be "wayland-egl", "wayland-xcomposite", and other values for which I haven't found a full list yet. Instead of matching only "wayland", we now look for "wayland" anywhere in the `QT_QPA_PLATFORM` string in a case-insensitive manner. Acknowledgements: `CaseInsensitiveContains`' implementation was heavily inspired by GNU's non-standard glibc `strcasestr` function, which can be found here licensed under GPLv2 or later: https://ftp.gnu.org/gnu/libc/
2025-07-12Fix various warningsJoshua Vandaële
2025-06-14Source: Remove redundant lambda parameter listsDr. Dystopia
2025-05-16UnitTests: Remove redundant template type specifersDr. Dystopia
2025-05-16UnitTests/Common: Use `std::size` for size calculationDr. Dystopia
2025-05-07Merge pull request #13569 from tygyh/UnitTests-Use-constexprJordan Woyak
UnitTests: Use `constexpr`
2025-04-30UnitTests: Add tests for WorkQueueThread.Jordan Woyak
2025-04-25Merge pull request #13451 from vyuuui/numeric_labelsTilka
Add numeric label support to assembler
2025-04-23UnitTests: Use `constexpr`Dr. Dystopia
2025-04-22Common: SPSCQueue cleanups and improvements.Jordan Woyak
2025-03-24Add numeric label support to assemblervyuuui
2025-01-29Add a SplitPath unit test exercising Windows paths with drive lettersNiel Lebeck
2025-01-06Fix several minor warningsSintendo
2024-12-26Add some unit test coverage of the SplitPath functionNiel Lebeck
2024-10-27Merge pull request #12744 from nlebeck/settingshandler-split-2JMC47
Split `SettingsHandler` into separate reader and writer classes
2024-10-22Add missing algorithm header in SettingsHandlerTest.cppAdmiral H. Curtiss
2024-10-21Split `SettingsHandler` into separate reader and writer classesNiel Lebeck
2024-10-10Modernize `std::equal` with rangesmitaclaw
2024-09-22StringUtil: Remove `JoinStrings`mitaclaw
With 12 uses of `JoinStrings` in the codebase vs 36 uses of `fmt::join`, fmtlib's range adapter for string concatenation with delimiters is clearly the preferred option.
2024-08-22Add support for libfmt-11Alfred Wingate
fmt::join was moved into fmt/ranges.h Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-06-09Add some unit tests for the `Rectangle` classNiel Lebeck
2024-05-05Merge pull request #12737 from nlebeck/settingshandler-splitJosJuice
Eliminate SettingsHandler's `SetBytes` and `Reset` methods
2024-05-03Replace Common::BitCast with std::bit_castPokechu22
2024-04-23Eliminate SettingsHandler's `SetBytes` and `Reset` methodsNiel Lebeck
Also make the `Decrypt` method private. As far as I can tell, the only motivation for exposing the `SetBytes` and `Reset` methods is to allow `CBoot::SetupWiiMemory` to use the same `SettingsHandler` instance to read settings data and then write it back. It seems cleaner to just use two separate instances, and require a given `SettingsHandler` instance to be used for either writing data to a buffer or reading data from a buffer, but not both. A natural next step is to split the `SettingsHandler` class into two classes, one for writing data and one for reading data. I've deferred that change for a future PR.
2024-04-12Pass SettingsHandler buffers by const ref instead of rvalue refNiel Lebeck
2024-03-06Add SettingsHandler unit tests exercising the edge case in PR #8704Niel Lebeck
2024-03-01Add simple unit tests for SettingsHandlerNiel Lebeck
2024-01-01BitSet64: Fix iterator incrementationDentomologist
Use 1 of the same type as the stored value when shifting left. This prevents undefined behavior caused by shifting an int more than 31 bits. Previously iterator incrementation could either hang or prematurely report it had reached the end of the bitset.
2023-12-31UnitTests: Refactor BitSetTestDentomologist
Group numbers and their bitcounts together in pairs, which allows for range-based loop iteration.
2023-12-16Merge pull request #11497 from vyuuui/debugger_assembler_uiTilka
Built-in assembler for debugger interface
2023-12-13Added testsvyuuui
2023-12-11FloatUtilsTest: Resolve -Wsign-compare warningLioncash
2023-11-28Remove _M_X86 in favour of _M_X86_64Zopolis4
2023-11-25Merge pull request #11881 from JosJuice/aarch64-function-callAdmiral H. Curtiss
JitArm64: Add utility for calling a function with arguments
2023-11-01JitArm64: Add utility for calling a function with argumentsJosJuice
With this, situations where multiple arguments need to be moved from multiple registers become easy to handle, and we also get compile-time checking that the number of arguments is correct.
2023-10-30UnitTests: Test ApproximateReciprocalSquareRootSintendo
2023-08-05X64EmitterTest: Check bytes instead of disassembly in JMP testDentomologist
Check bytes directly to avoid ambiguity in the disassembly between short and near jumps, which could hypothetically cause the test to pass when it shouldn't.
2023-08-05x64EmitterTest: add J/J_CC/CALL unit testsDentomologist
2023-06-17xEmitter: Convert PrefetchLevel to enum classDentomologist
2023-06-12XEmitter: Add enum class JumpDentomologist
Replace the bool parameter force5bytes in J, JMP, and J_CC with an enum class Jump::Short/Near. Many callers set that parameter to the literal 'true', which was unclear if you didn't already know what it did.
2023-05-16StringUtil: Move GetEscapedHtml() into Common namespaceLioncash
2023-04-15Common/MathUtil: Move IntLog2 into MathUtil namespaceLioncash
Gets this out of the global namespace.