Spaces:
Sleeping
Sleeping
File size: 2,395 Bytes
463f868 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | //! Engine Test Suite - Organization Guide
//!
//! # Test Categorization Strategy
//!
//! This test suite is organized into four primary categories:
//! 1. **QA Tests** - Official rules and clarifications
//! 2. **Opcode Tests** - Bytecode instruction validation
//! 3. **Mechanics Tests** - Game flow and interactions
//! 4. **Edge Cases** - Stress tests and rare scenarios
//!
//! # Directory Structure
//!
//! ```
//! tests/
//! βββ README.md # This directory's documentation
//! βββ qa/ # Official Q&A rule tests (reference)
//! β βββ mod.rs # QA test organization notes
//! βββ opcodes/ # Opcode instruction tests
//! β βββ mod.rs # Opcode test documentation
//! βββ mechanics/ # Game mechanics tests
//! β βββ mod.rs # Mechanics test documentation
//! βββ edge_cases/ # Stress and rare scenario tests
//! βββ mod.rs # Edge case documentation
//! βββ stress_rare_bytecode_sequences.rs # Complex bytecode stress tests
//! ```
//!
//! **Note**: The actual QA tests remain in `src/qa/` because they depend on
//! internal module access and the real card database. This organization serves
//! as a reference and planning structure for future reorganization.
//!
//! # Performance Characteristics
//!
//! - **Full Suite**: 568 tests in ~17 seconds (parallelized)
//! - **Single-threaded**: ~70 seconds (for deterministic debugging)
//! - **Memory**: ~200MB peak during execution
//! - **Parallelization**: 4-8 threads (adjustable with --test-threads=N)
//!
//! # Adding New Tests
//!
//! 1. Determine category (qa, opcodes, mechanics, or edge_cases)
//! 2. Create test file in appropriate subdirectory
//! 3. Add detailed doc comments explaining what is tested
//! 4. Use existing test helpers from crate root
//! 5. Run `cargo test --lib` to verify discovery
//!
//! ## Test Naming Conventions
//!
//! - QA tests: `test_q###_brief_description`
//! - Opcode tests: `test_opcode_name_scenario`
//! - Mechanics tests: `test_mechanic_name_scenario`
//! - Stress tests: `test_stress_scenario_name`
//! - Regression tests: `test_regression_issue_number`
// pub mod qa;
// pub mod opcodes;
// pub mod mechanics;
// pub mod edge_cases;
|