Provide detailed instructions on running TEST_CASEs.
(
arguments: dict[str, Any], project_root: Path
)
| 740 | |
| 741 | |
| 742 | async def test_instructions( |
| 743 | arguments: dict[str, Any], project_root: Path |
| 744 | ) -> CallToolResult: |
| 745 | """Provide detailed instructions on running TEST_CASEs.""" |
| 746 | |
| 747 | instructions = """ |
| 748 | # FastLED TEST_CASE Execution Guide |
| 749 | |
| 750 | ## Overview |
| 751 | FastLED uses the **doctest** framework for C++ unit testing. Tests are organized in files named `test_*.cpp` in the `tests/` directory. Each file can contain multiple `TEST_CASE` macros. |
| 752 | |
| 753 | ## Test Structure |
| 754 | - **Test Files**: Located in `tests/test_*.cpp` (e.g., `test_algorithm.cpp`, `test_easing.cpp`) |
| 755 | - **TEST_CASEs**: Individual test functions defined with `TEST_CASE("name")` macro |
| 756 | - **SUBCASEs**: Nested test sections within TEST_CASEs using `SUBCASE("name")` |
| 757 | |
| 758 | ## Running Tests |
| 759 | |
| 760 | ### 🚨 CRITICAL: Always Use `bash test` Format |
| 761 | |
| 762 | **[OK] CORRECT Format:** |
| 763 | ```bash |
| 764 | bash test # Run all tests |
| 765 | bash test <test_name> # Run specific test |
| 766 | ``` |
| 767 | |
| 768 | **[ERROR] INCORRECT Format:** |
| 769 | ```bash |
| 770 | ./.build/bin/test_<name>.exe # DO NOT run executables directly |
| 771 | ./tests/.build/bin/test_* # DO NOT use this format |
| 772 | ``` |
| 773 | |
| 774 | ### 1. Run All Tests |
| 775 | ```bash |
| 776 | bash test |
| 777 | ``` |
| 778 | |
| 779 | ### 2. Run Specific Test File |
| 780 | ```bash |
| 781 | bash test <test_name> |
| 782 | ``` |
| 783 | Example: `bash test algorithm` (runs `test_algorithm.cpp`) |
| 784 | Example: `bash test audio_json_parsing` (runs `test_audio_json_parsing.cpp`) |
| 785 | |
| 786 | ### 3. Alternative: Using test.py directly |
| 787 | For advanced options, you can also use: |
| 788 | ```bash |
| 789 | uv run test.py # Run all tests |
| 790 | uv run test.py --cpp # Run only C++ tests |
| 791 | uv run test.py --cpp <name> # Run specific test file |
| 792 | ``` |
| 793 | |
| 794 | ### 4. Run with Verbose Output |
| 795 | ```bash |
| 796 | uv run test.py --cpp <test_name> --verbose |
| 797 | ``` |
| 798 | |
| 799 | ### 5. Using MCP Server Tools |