MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_instructions

Function test_instructions

mcp_server.py:742–862  ·  view source on GitHub ↗

Provide detailed instructions on running TEST_CASEs.

(
    arguments: dict[str, Any], project_root: Path
)

Source from the content-addressed store, hash-verified

740
741
742async 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
751FastLED 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
764bash test # Run all tests
765bash 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
776bash test
777```
778
779### 2. Run Specific Test File
780```bash
781bash test <test_name>
782```
783Example: `bash test algorithm` (runs `test_algorithm.cpp`)
784Example: `bash test audio_json_parsing` (runs `test_audio_json_parsing.cpp`)
785
786### 3. Alternative: Using test.py directly
787For advanced options, you can also use:
788```bash
789uv run test.py # Run all tests
790uv run test.py --cpp # Run only C++ tests
791uv run test.py --cpp <name> # Run specific test file
792```
793
794### 4. Run with Verbose Output
795```bash
796uv run test.py --cpp <test_name> --verbose
797```
798
799### 5. Using MCP Server Tools

Callers 1

call_toolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected