summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Core
AgeCommit message (Collapse)Author
2021-05-15JitArm64: Implement frsqrteJosJuice
2021-05-15JitArm64: Implement fresJosJuice
2021-05-13JitArm64: Add FPRF unit testJosJuice
2021-05-07Merge pull request #9683 from JosJuice/ppc-test-valuesLéo Lam
UnitTests: Put PowerPC test values in a separate file
2021-05-02UnitTests: Put PowerPC test values in a separate fileJosJuice
We use more or less the same values for all PowerPC float unit tests. Let's put them in one place instead of duplicating them.
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-25JitArm64: Add unit tests for single/double conversionJosJuice
2021-03-13Arm64Gen: Convert ARM64Reg to enum classDentomologist
Most changes are just adding ARM64Reg:: in front of the constants.
2021-02-13Arm64Emitter: Expand the MOVI2R unit test a littleJosJuice
This tests for a bug with ADRP which was present in an earlier version of this pull request. Also adding the MOVI2R unit test to the VS build.
2021-01-31MovI2R: Do not exhaustively testMerryMage
2021-01-31UnitTests: Add MOVI2R testMerryMage
2021-01-27Merge pull request #9436 from shuffle2/asanLéo Lam
msvc: enable asan compat
2021-01-22UnitTests: Add setup error checkingDentomologist
Check return value of calls to File::CreateTempDir() from CoreTiming, FileSystem, and MMIO test classes to verify the test user directory exists, and fail the tests otherwise.
2021-01-10msvc: add asan support (disabled by default)Shawn Hoffman
2020-12-04Turn format string issues into compile-time errorsLéo Lam
If the compiler can detect an issue with a format string at compile time, then we should take advantage of that and turn the issue into a hard compile-time error as such problems almost always lead to UB. This helps with catching logging or assertion messages that have been converted over to fmt but are still using the old, non-fmt variants of the logging macros. This commit also fixes all incorrect usages that I could find.
2020-08-16UnitTests: quiet warningsShawn Hoffman
2020-01-30IOS/FS: Fix CreateFullPath to not create directories that already existLéo Lam
This fixes CreateFullPath to not create directories when it is known that they already exist, instead of calling CreateDirectory anyway and checking if the error is AlreadyExists. (That doesn't work now that we have an accurate implementation of CreateDirectory that performs permission checks before checking for existence.) I'm not sure what I was thinking when I wrote that function. Also adds some tests for CreateFullPath.
2020-01-25Merge pull request #8539 from leoetlino/fs-accuracyTilka
IOS/FS: Reimplement many functions in a more accurate way
2020-01-25UnitTests/FS: Improve deletion testLéo Lam
* Test recursive directory deletion * Test "in use" check for both files and directories
2020-01-25UnitTests/FS: Add ReadDirectory ordering test (issue 10234)Léo Lam
2020-01-25UnitTests/FS: Fix file rename testsLéo Lam
Files cannot be given a different file name, only moved across directories. Add a test for that behaviour and fix the existing RenameWithExistingTargetFile test.
2020-01-25UnitTests/FS: Add path validity and splitting testsLéo Lam
2020-01-25UnitTests/FS: Add metadata testsLéo Lam
2019-05-25Jit64AsmCommon: Make ConvertDoubleToSingle use RSCRATCH as outputMerryMage
2019-05-25UnitTests/Jit64Common: Test GenConvertDoubleToSingleMerryMage
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2018-12-15stop using g_jit outside of JitInterfaceCrystalGamma
Replace g_jit in x86-64 ASM routines code by m_jit member reference
2018-09-28UnitTets: Add tests for frsqrteMerryMage
2018-06-15PowerPC: Convert CPUCore enum into an enum classLioncash
Makes the enum values strongly-typed and prevents the identifiers from polluting the PowerPC namespace. This also cleans up the parameters of some functions where we were accepting an ambiguous int type and expecting the correct values to be passed in. Now those parameters accept a PowerPC::CPUCore type only, making it immediately obvious which values should be passed in. It also turns out we were storing these core types into other structures as plain ints, which have also been corrected. As this type is used directly with the configuration code, we need to provide our own overloaded insertion (<<) and extraction (>>) operators in order to make it compatible with it. These are fairly trivial to implement, so there's no issue here. A minor adjustment to TryParse() was required, as our generic function was doing the following: N tmp = 0; which is problematic, as custom types may not be able to have that assignment performed (e.g. strongly-typed enums), so we change this to: N tmp; which is sufficient, as the value is attempted to be initialized immediately under that statement.
2018-06-03FS: Add a struct for modesLéo Lam
As suggested here: https://dolp.in/pr7059#pullrequestreview-125401778 More descriptive than having a std::tuple of FS::Mode, and lets us give names to known triplets of modes (like in ES). Functions that only forward mode arguments are slightly less verbose now too.
2018-05-08IOS/FS: Fix rename not handling existing target correctlyLéo Lam
The existing backend did not handle cases where the target exists correctly. This is a bug that has been around forever but was only recently exposed when ES started to use our FS code. Also adds some unit tests to make sure this won't get broken again.
2018-04-15UnitTests: Add tests for the Wii filesystemLéo Lam
This adds unit tests for the Wii filesystem now that the filesystem interface is neatly separated from the IPC code. Basic FS functionality is tested, in addition to problematic usages and edge cases that Dolphin used to handle incorrectly (which of course broke emulated software). These tests should make it quite a bit harder to introduce regressions. Issues that are covered by the tests in particular: * Metadata: issue 10234 (though tests are commented out for now because Dolphin doesn't support NAND images yet so it can't track metadata); * EOF seeks/reads: https://github.com/dolphin-emu/dolphin/pull/4942 * Read/write operations from multiple handles: see issue 2917, 5232 and 8702 and https://github.com/dolphin-emu/dolphin/pull/2649
2018-03-24CPUCoreBase: Make the GetName() member function const qualifiedLioncash
This function should have no need to modify internal class state.
2017-09-24UnitTests: Add DSP accelerator testsLéo Lam
Includes DSP accelerator tests for basic behaviour, and everything that was fixed by the PR.
2017-07-09Merge Core/Config/Config.h into Common/Config/Config.hMichael Maltese
Allows code in Common to take advantage of the layered config logic.
2017-06-30DSPDisassembler: remove unused base_addr parameterMichael Maltese
2017-06-30DSPDisassembler: get rid of double-pass and temp fileMichael Maltese
2017-06-26Add CommonTitles.h for common Wii title IDsLéo Lam
2017-06-18UnitTests: Use a temporary profile directoryLéo Lam
This prevents Dolphin from modifying any file in the user directory.
2017-06-14IOS/ESFormats: Use SignedBlobReader for TMDs and ticketsLéo Lam
2017-06-06unittests: set user directory so SYSCONF does not get created at the drive rootShawn Hoffman
2017-06-05Merge pull request #5418 from MerryMage/config-again-and-againshuffle2
VideoConfig: Port to layered configuration system
2017-06-05DSPTool: extract tests into a DSPAssemblyTestMichael Maltese
- Moves all test code from DSPTool into UnitTests/Core/DSPAssemblyTest. - Converts test files (which could only be loaded if they were in the shell's working directory, so basically never) into C++ values. - Enables most of the commented-out tests. - Removes non-deterministic random code test.
2017-06-03Config: IntegrateMerryMage
2017-04-10Merge pull request #5144 from MerryMage/mfsprMarkus Wick
Jit_SystemRegisters: Make mfspr PIE-compliant
2017-04-05Add unit tests for IOS/ESFormatsLéo Lam
This adds unit tests for IOS/ESFormats, and in particular, for the TMDReader. It is tested using invalid TMDs (to check IsValid()) and two valid, properly signed TMDs. Things which are now tested: * Title type helper functions. * TMDReader: Validity check. * TMDReader: General information returned by the Get*() methods. * TMDReader: Raw TMD and generated TMD view, compared against IOS. * TMDReader: Game ID generation code (which is Dolphin specific). * TMDReader: Content information: getting by ID/index, order, metadata.
2017-04-05CoreTiming: Pull globals into a single structMerryMage
2017-03-24CoreTimingTest: make AdvanceAndCheck() static (fix warning)Michael Maltese
Fixes warning: ``` ../Source/UnitTests/Core/CoreTimingTest.cpp: In function 'void AdvanceAndCheck(u32, int, int, int)': ../Source/UnitTests/Core/CoreTimingTest.cpp:52:6: error: no previous declaration for 'void AdvanceAndCheck(u32, int, int, int)' [-Werror=missing-declarations] void AdvanceAndCheck(u32 idx, int downcount, int expected_lateness = 0, int cpu_downcount = 0) ^ ```
2017-01-07Add the g_ prefix to the jit globalLéo Lam
Jan 04 22:55:01 <leoetlino> fwiw, it looks like there are new warnings in the RegCache code Jan 04 22:55:04 <leoetlino> Source/Core/Core/PowerPC/Jit64/FPURegCache.cpp:13:33: warning: declaration shadows a variable in the global namespace [-Wshadow] Jan 04 22:56:19 <@Lioncash> yeah, the jit global should have a g_ prefix. This fixes shadowing warnings and adds the g_ prefix to a global.
2016-09-08CoreTiming: Guarantee FIFO processing of timed eventsEmptyChaos
The min-heap provides no ordering when the key is the same on 2 nodes. Disambiguate identical times by tracking the order items were added into the queue.