Document parallel test execution and pure function requirements in settest/graphtest#58
Document parallel test execution and pure function requirements in settest/graphtest#58
Conversation
Co-authored-by: jbduncan <[email protected]>
…ester style Co-authored-by: jbduncan <[email protected]>
|
@copilot Parameters |
…Only docs Co-authored-by: jbduncan <[email protected]>
Fixed in commit 52489a5. Removed |
Completes the final TODO from issue #36: documenting that test suite functions run in parallel and require pure builder functions.
Changes
set/settest/tester.goTestReadOnlyandTestMutablespecifying thatsliceToSetmust be pure (no side effects, deterministic)graph/graphtest/tester.goTestReadOnlyandTestMutablespecifying thatemptyGraphmust be pureaddNodeandputEdgeparameters are not required to be pure functions, as they are designed to allow users to specify how nodes and edges are added regardless of graph mutabilityAll test functions internally use
t.Parallel(), so builder functions (emptyGraphandsliceToSet) passed by callers must avoid shared mutable state to prevent race conditions.Example usage constraint now documented:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.