summaryrefslogtreecommitdiff
path: root/Source/UnitTests
AgeCommit message (Collapse)Author
2024-11-15GDBStub: Signal Breakpoint Changes To Hostmitaclaw
2024-10-30Merge pull request #13147 from mitaclaw/jit-block-table-model-fixJMC47
JitBlockTableModel: Catch All Block Invalidating Events (I Hope)
2024-10-27Merge pull request #12744 from nlebeck/settingshandler-split-2JMC47
Split `SettingsHandler` into separate reader and writer classes
2024-10-23Host: Rename `JitCacheInvalidation`mitaclaw
There are two hard problems in computer science...
2024-10-22Add missing algorithm header in SettingsHandlerTest.cppAdmiral H. Curtiss
2024-10-21Split `SettingsHandler` into separate reader and writer classesNiel Lebeck
2024-10-19DolphinQt: JIT Widget Refreshmitaclaw
Fulfilling a certain six-year-old todo.
2024-10-19JITs: Add GetMemoryStats Functionmitaclaw
Using the updated rangeset library
2024-10-19JITs: Add EraseSingleBlock Functionmitaclaw
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-12Cache normals in addition to binormals and tangentsPokechu22
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used. LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
2024-10-10Modernize `std::equal` with rangesmitaclaw
2024-10-10Modernize `std::count` 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-08-17UnitTests: Remove MSBuild input/output trackingJosJuice
Input/output tracking is intended to speed up incremental builds by skipping a target when it doesn't need to be built. However, this seems to be unreliable for UnitTests' AfterBuild target. Let's remove it. It's still the case that UnitTests' AfterBuild target will be skipped if UnitTests doesn't need to be rebuilt. (Note that UnitTests always needs to be rebuilt if SCMRevGen changed.) I haven't seen these problems with DolphinQt's rather similar input/output tracking. This may be because DolphinQt's one also has the exe file as an input/output.
2024-08-16UnitTests: Delete output Sys folder before copying to itJosJuice
Like the previous commit, but for UnitTests. This time all operating systems were affected. I also made UnitTests.vcxproj use the same way of copying as DolphinQt.vcxproj, just for consistency.
2024-08-16Merge pull request #13015 from tygyh/Use-boolean-literalsTilka
Replace boolean constants with boolean literals
2024-08-15Use 'contains' methodmitaclaw
2024-08-15Replace boolean constants with boolean literalsDr. Dystopia
2024-08-14Remove self-comparisonDr. Dystopia
2024-07-07Add Unit Test for Patch AllowlistLillyJadeKatrin
This unit test compares ApprovedInis.json with the contents of the GameSettings folder to verify that every patch marked allowed for use with RetroAchievements has a hash in ApprovedInis.json. If not, that hash is reported in the test logs so that the hash may be updated more easily.
2024-06-15Merge pull request #12815 from ↵Admiral H. Curtiss
Dentomologist/enable_hotkeys_and_controllers_for_focused_tas_input TAS Input: Enable emulator hotkeys and controller input when TAS Input window has focus
2024-06-10Merge pull request #12837 from JosJuice/cmake-one-tests-binaryAdmiral H. Curtiss
CMake: Put all unit tests in one binary
2024-06-09Add some unit tests for the `Rectangle` classNiel Lebeck
2024-06-06CMake: Put all unit tests in one binaryJosJuice
We currently have 32 different binaries containing unit tests. At least when I build for Android, each one takes up over 200 MiB, and linking them all increases my incremental build times by over a minute. I'd like to change this for the sake of my productivity and disk space. For reference, MSBuild is already putting all tests in a single binary.
2024-05-31TAS Input: Enable hotkeys and controller input when Input has focusDentomologist
Enable emulator hotkeys and controller input (when that option is enabled) when a TAS Input window has focus, as if it was the render window instead. This allows TASers to use frame advance and the like without having to switch the focused window or disabling Hotkeys Require Window Focus which also picks up keypresses while other apps are active. Cursor updates are disabled when the TAS Input window has focus, as otherwise the Wii IR widget (and anything else controlled by the mouse) becomes unusable. The cursor continues to work normally when the render window has focus.
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-22port to OpenBSDGuilherme Janczak
2024-04-12Pass SettingsHandler buffers by const ref instead of rvalue refNiel Lebeck
2024-04-12Merge pull request #12614 from nlebeck/settingshandler-edgecaseTilka
Add SettingsHandler unit tests exercising the edge case fixed in PR #8704
2024-04-04Fix out of bounds accesses for invalid vertex component formatsPokechu22
On all platforms, this would result in out of bounds accesses when getting the component sizes (which uses stuff from VertexLoader_Position.h/VertexLoader_TextCoord.h/VertexLoader_Normal.h). On platforms other than x64 and ARM64, this would also be out of bounds accesses when getting function pointers for the non-JIT vertex loader (in VertexLoader_Position.cpp etc.). Usually both of these would get data from other entries in the same multi-dimensional array, but the last few entries would be truly out of bounds. This does mean that an out of bounds function pointer can be called on platforms that don't have a JIT vertex loader, but it is limited to invalid component formats with values 5/6/7 due to the size of the bitfield the formats come from, so it seems unlikely that this could be exploited in practice. This issue affects a few games; Def Jam: Fight for New York (https://bugs.dolphin-emu.org/issues/12719) and Fifa Street are known to be affected. I have not done any hardware testing for this PR specifically, though I *think* I previously determined that at least a value of 5 behaves the same as float (4). That's what I implemented in any case. I did previously determine that both Def Jam: Fight for New York and Fifa Street use an invalid normal format, but don't actually have lighting enabled when that normal vector is used, so it doesn't change rendering in practice. The color component format also has two invalid values, but VertexLoader_Color.h/.cpp do check for those invalid ones and return a default value instead of doing an out of bounds access.
2024-03-31Merge pull request #12645 from mitaclaw/ppc-symbols-signalAdmiral H. Curtiss
DolphinQt: A Ubiquitous Signal For When Symbols Change
2024-03-28DolphinQt: A Ubiquitous Signal For When Symbols Changemitaclaw
There were three distinct mechanisms for signaling symbol changes in DolphinQt: `Host::NotifyMapLoaded`, `MenuBar::NotifySymbolsUpdated`, and `CodeViewWidget::SymbolsChanged`. The behavior of these signals has been consolidated into the new `Host::PPCSymbolsUpdated` signal, which can be emitted from anywhere in DolphinQt to properly update symbols everywhere in DolphinQt.
2024-03-23DivUtils: Add unsigned division magic functionBram Speeckaert
Takes the logic from Jit64 and moves it into DivUtils, so it can be reused by other backends as well.
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-31Migrate SConfig::bWii to System.Admiral H. Curtiss
2024-01-12Core/HW/MMIO: Pass System through Read() and Write().Admiral H. Curtiss
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-16Merge pull request #12427 from JosJuice/jitarm64-msr-updated-logical-immAdmiral H. Curtiss
JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
2023-12-16JitArm64: Use enum class for LogicalImm size parameterJosJuice
This should prevent issues like the one fixed in the previous commit from happening again.
2023-12-13Added testsvyuuui
2023-12-12Merge pull request #12395 from lioncash/testTilka
VertexLoaderTest: Resolve -Wdangling-else warnings
2023-12-11VertexLoaderTest: Resolve -Wdangling-else warningsLioncash
The ways the assertion macros expand end up generating -Wdangling-else warnings. Trivial enough to fix by just bracing the if statements.
2023-12-11FloatUtilsTest: Resolve -Wsign-compare warningLioncash