-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Running Unit Tests
Amphitryon0 edited this page Dec 8, 2024
·
11 revisions
The Dolphin source code contains unit tests that aim to:
- Help find bugs when porting Dolphin to a new platform
- Make refactoring and code changes safer by enforcing API contracts
The tests are located in the Source/UnitTests
directory and use the Google Test framework.
For tests that can compare Dolphin to actual hardware, see the hwtests repository.
The UnitTests project is compiled as part of the normal build on Windows. There are a few ways to run the tests:
-
Use the Test Adapter for Google Test component for Visual Studio in order to integrate tests into the Test Explorer.
-
Invoke execution via msbuild with the
RunUnitTests
property, for example:
pushd Source
msbuild /v:m /m /p:Platform=x64 /p:Configuration=Release /p:RunUnitTests=true dolphin-emu.sln
- Directly run the UnitTests binary:
pushd Build\x64\Release\UnitTests\bin
UnitTests
Use the unittests
build target:
make unittests
Each module test can also be run independently using the binaries in $OUTPUT_DIR/Binaries/Tests
.
Homepage | Project Site | Forums | Wiki | Issue Tracker | Coding Style | Transifex Page