Add and update name convention
Some checks failed
Continuous Integration / Code Formatting (push) Successful in 30s
Continuous Integration / Code Quality Check (push) Successful in 30s
Continuous Integration / Test Execution (push) Failing after 17s
Continuous Integration / CI Summary (push) Failing after 4s

This commit is contained in:
2025-09-30 00:09:55 +04:00
parent 61951a047b
commit 5275c5ca94
57 changed files with 455 additions and 68 deletions

View File

@@ -11,9 +11,11 @@ The `tests/` directory contains:
- Performance benchmarks
- Debugging tools
> 📋 **File Naming**: All test files follow the [naming conventions](CODE_OF_CONDUCT.md#2-file-naming-standards) with PascalCase and "Test" prefix (e.g., `TestAudioManager.gd`).
## Current Test Files
### `test_logging.gd`
### `TestLogging.gd`
Test script for DebugManager logging system.
**Features:**
@@ -26,10 +28,10 @@ Test script for DebugManager logging system.
**Usage:**
```gdscript
# Option 1: Add as temporary autoload
# In project.godot, add: tests/test_logging.gd
# In project.godot, add: tests/TestLogging.gd
# Option 2: Instantiate in a scene
var test_script = preload("res://tests/test_logging.gd").new()
var test_script = preload("res://tests/TestLogging.gd").new()
add_child(test_script)
# Option 3: Run directly from editor
@@ -49,7 +51,7 @@ Follow these conventions for new test files:
### File Naming
- Use descriptive names starting with `test_`
- Example: `test_audio_manager.gd`, `test_scene_transitions.gd`
- Example: `TestAudioManager.gd`, `test_scene_transitions.gd`
### File Structure
```gdscript
@@ -104,20 +106,20 @@ func test_error_conditions():
### System Tests
Test core autoload managers and global systems:
- `test_logging.gd` - DebugManager logging system
- `TestLogging.gd` - DebugManager logging system
- `test_checksum_issue.gd` - SaveManager checksum validation and deterministic hashing
- `test_migration_compatibility.gd` - SaveManager version migration and backward compatibility
- `TestMigrationCompatibility.gd` - SaveManager version migration and backward compatibility
- `test_save_system_integration.gd` - Complete save/load workflow integration testing
- `test_checksum_fix_verification.gd` - Verification of JSON serialization checksum fixes
- `test_settings_manager.gd` - SettingsManager security validation, input validation, and error handling
- `test_game_manager.gd` - GameManager scene transitions, race condition protection, and input validation
- `test_audio_manager.gd` - AudioManager functionality, resource loading, and volume management
- `TestSettingsManager.gd` - SettingsManager security validation, input validation, and error handling
- `TestGameManager.gd` - GameManager scene transitions, race condition protection, and input validation
- `TestAudioManager.gd` - AudioManager functionality, resource loading, and volume management
### Component Tests
Test individual game components:
- `test_match3_gameplay.gd` - Match-3 gameplay mechanics, grid management, and match detection
- `test_tile.gd` - Tile component behavior, visual feedback, and memory safety
- `test_value_stepper.gd` - ValueStepper UI component functionality and settings integration
- `TestMatch3Gameplay.gd` - Match-3 gameplay mechanics, grid management, and match detection
- `TestTile.gd` - Tile component behavior, visual feedback, and memory safety
- `TestValueStepper.gd` - ValueStepper UI component functionality and settings integration
### Integration Tests
Test system interactions and workflows:
@@ -135,7 +137,7 @@ SaveManager implements security features requiring testing for modifications.
**Tests**: Checksum generation, JSON serialization consistency, save/load cycles
**Usage**: Run after checksum algorithm changes
#### **`test_migration_compatibility.gd`** - Version Migration
#### **`TestMigrationCompatibility.gd`** - Version Migration
**Tests**: Backward compatibility, missing field addition, data structure normalization
**Usage**: Test save format upgrades
@@ -164,7 +166,7 @@ SaveManager implements security features requiring testing for modifications.
#### **Test Sequence After Modifications**
1. `test_checksum_issue.gd` - Verify checksum consistency
2. `test_migration_compatibility.gd` - Check version upgrades
2. `TestMigrationCompatibility.gd` - Check version upgrades
3. `test_save_system_integration.gd` - Validate workflow
4. Manual testing with corrupted files
5. Performance validation
@@ -182,7 +184,7 @@ godot --headless --script tests/test_checksum_issue.gd
# Run all save system tests
godot --headless --script tests/test_checksum_issue.gd
godot --headless --script tests/test_migration_compatibility.gd
godot --headless --script tests/TestMigrationCompatibility.gd
godot --headless --script tests/test_save_system_integration.gd
```
@@ -200,7 +202,7 @@ For CI/CD integration:
- name: Run Test Suite
run: |
godot --headless --script tests/test_checksum_issue.gd
godot --headless --script tests/test_migration_compatibility.gd
godot --headless --script tests/TestMigrationCompatibility.gd
# Add other tests as needed
```