param([string]$SourcePath = (Join-Path $PSScriptRoot '..\ParkrobTrajplanner\Map\Test\MovementTest.MapTest.cs'))

$ErrorActionPreference = 'Stop'
$source = Get-Content -LiteralPath $SourcePath -Raw

function Assert-Contains([string]$Expected, [string]$Message) {
    if (-not $source.Contains($Expected)) { throw "$Message Missing=$Expected" }
}

Assert-Contains 'EnableTerminalDebugLog' 'MapTest must expose a terminal logging switch.'
Assert-Contains 'SavePng' 'MapTest must expose a PNG export switch.'
$begin = -join [char[]](0x89C4, 0x5212, 0x5730, 0x56FE, 0x521B, 0x5EFA, 0x5F00, 0x59CB)
$sources = -join [char[]](0x969C, 0x788D, 0x7269, 0x6765)
$projection = -join [char[]](0x6295, 0x5F71, 0x7ED3, 0x679C)
$snapshot = -join [char[]](0x5730, 0x56FE, 0x5FEB, 0x7167)
$end = -join [char[]](0x89C4, 0x5212, 0x5730, 0x56FE, 0x521B, 0x5EFA, 0x5B8C, 0x6210)
Assert-Contains 'FormatSourceStatus' 'MapTest must translate projection status for terminal output.'
Assert-Contains 'FormatCacheHit' 'MapTest must translate cache hits for terminal output.'
Assert-Contains 'FormatImageResult' 'MapTest must translate image export results for terminal output.'
if ($source.Contains('PLANNING_MAP_CREATE_BEGIN')) { throw 'MapTest must not expose English terminal log markers.' }
Assert-Contains 'PlanningMapFactory' 'MapTest must continue using the public map facade.'

Write-Output 'Planning map MovementTest configuration checks passed.'
