summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common
AgeCommit message (Collapse)Author
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.
2023-03-22Common: Move FixedSizeQueue into Common namespaceLioncash
Gets this out of the global namespace.
2023-02-15Add unit test for File::CreateFullPath().Admiral H. Curtiss
2023-01-24Common: Replace StringBeginsWith/StringEndsWith with std equivalentsLioncash
Obsoletes these functions in favor of the standard member functions added in C++20.
2022-12-11Replace BitUtils with C++20: RotateLeft/RotateRightJosJuice
Now that we've flipped the C++20 switch, let's start making use of the nice new <bit> header. I'm planning on handling this move away from BitUtils.h incrementally in a series of PRs. There may be a few functions remaining in BitUtils.h by the end that C++20 doesn't have any equivalents for.
2022-07-27Crypto/SHA1: add unittestsShawn Hoffman
2022-07-25CPUDetect: improve win/arm64 supportShawn Hoffman
read brand_string on macos/arm64 remove unused flags report family/model info instead of vendor name
2022-04-27msvc: disable optimizations for x64EmitterTest.cppShawn Hoffman
40s -> 5s speedup
2022-01-20Merge pull request #10367 from Pokechu22/fmt-8.1.1JosJuice
Update to fmt 8.1.1
2022-01-16Use Common::ToLower and Common::ToUpperPokechu22
2022-01-13Make all fmt::formatter constructors constexprPokechu22
2021-12-18Fifo analyzer: Display equations for color/alpha combinersPokechu22
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-07-17unittests: remove some msvc-specific castsShawn Hoffman
compiles on contemporary msvc checked there is still a mul in release codegen
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-06-28x64Emitter: remove unused x87 instructionsTillmann Karras
2021-06-01Updater: Escape HTML characters in commit descriptionsDentomologist
2021-05-02UnitTests: Move some unit tests to where they should beJosJuice
Two unit tests were in the root UnitTests folder and were not being built when using CMake.
2021-04-06MathUtil: Add SaturatingCast to cast floats more safelyLéo Lam
2021-03-06Create BitFieldArrayPokechu22
2021-03-06Add fmt support to BitFieldPokechu22
2021-03-06Allow specifying StorageType for BitFieldPokechu22
This is useful for BitFields that are bools.
2021-03-06Create EnumFormatterPokechu22
2020-08-24x64Emitter: Check end of allocated space when emitting code.Admiral H. Curtiss
2020-01-13x64Emitter: Unit test memory addressing modesSintendo
Test the behavior of OpArg::WriteRest by using MOV with the various addressing modes (MatR, MRegSum, etc.) in the source operand. Both the instruction and the instruction length are validated.
2020-01-06Merge pull request #8133 from Sintendo/mov64imm32Tilka
x64Emitter: Emit shorter MOVs for 32-bit immediates
2019-08-31FixedSizeQueue: Bugfixes and improvementsSilent
- Fixed a bug where pushing items over queue's size left it in a corrupted state - For non-trivial types, have clear() and pop() run destructors - Added emplace(args...) - Added empty() FixedSizeQueue has semantics of a circular buffer, so pushing items continuously is expected to keep overwriting oldest elements gracefully. Tests have been updated to verify correctness of a previously bugged behaviour and to verify correctness of destructing non-trivial types
2019-06-01Common/CommonFuncs: Remove now-unneccessary ArraySize functionLioncash
Since C++17, non-member std::size() is present in the standard library which also operates on regular C arrays. Given that, we can just replace usages of ArraySize with that where applicable. In many cases, we can just change the actual C array ArraySize() was called on into a std::array and just use its .size() member function instead. In some other cases, we can collapse the loops they were used in, into a ranged-for loop, eliminating the need for en explicit bounds query.