From 135f59617f2e80cc5c4a64f405573b24ca95f5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 31 Jul 2026 16:25:59 +0200 Subject: [PATCH] Add instructions for running the C++ unit tests to AGENTS.md The /unittest subdirectory contains a separate binary with C++ unit tests alongside the pspautotests runner. Document how to build and run them (UnitTest.exe on Windows, PPSSPPUnitTest on Linux/Mac), and that they should be run after substantial changes at the end of a chunk of work. --- AGENTS.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 74b0b1ce5d..b1e1ae64de 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,7 +17,16 @@ Ignore the folder ai_instructions in the root directory, it's old stuff from con ## Build and Validation To verify that things build on Linux/Mac, use ./b.sh --debug. For Windows, use the Visual Studio solution in the Windows subdirectory. -Do not run unit test (I will add instructions for how to run them later). + +In addition to the pspautotests runner (test.py), there is a separate binary with C++ unit tests +in the /unittest subdirectory. After substantial changes (at the end of a chunk of work, not +necessarily after every edit), run these too: + +- Windows: build the `UnitTest` project (unittest/UnitTests.vcxproj), then run `Windows/x64/Debug/UnitTest.exe all` +- Linux/Mac: configure with `-DUNITTEST=ON`, then run `build/PPSSPPUnitTest all` + +This runs all tests in `availableTests` in unittest/UnitTest.cpp. You can run a single test by +passing its name instead of `all`; no arguments lists the available tests. ## Multiplatform considerations