Files
Reims-Go/internal/host/log_diagnose_test.go
NwflowerandClaude Opus 5.5 b203bde650 refactor: merge duplicated helpers and the window event contract
Events to the frontend go through App.emit, and a test keeps their names
in step with wails.ts. QEMU argument splitting, hidden console processes,
the macOS release record, the running check and a few smaller helpers
now exist once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:09:19 -07:00

18 lines
779 B
Go

package host
import "testing"
func TestDiagnoseGPULog(t *testing.T) {
lost := "reims-vgpu: the rt platform's device on AMD Radeon (TM) Graphics (1002:15e7) was lost at vkQueueSubmit2 (ERROR_DEVICE_LOST)"
if code, detail := DiagnoseGPULog(lost); code != "gpu_device_lost" || detail == "" {
t.Fatalf("DiagnoseGPULog(lost) = (%q, %q), want gpu_device_lost", code, detail)
}
floor := "reims-vgpu: no physical device meets the floor (VK_ERROR_INCOMPATIBLE_DRIVER)"
if code, detail := DiagnoseGPULog(floor); code != "gpu_vulkan_floor" || detail == "" {
t.Fatalf("DiagnoseGPULog(floor) = (%q, %q), want gpu_vulkan_floor", code, detail)
}
if code, _ := DiagnoseGPULog("normal boot log line"); code != "" {
t.Fatalf("expected empty code for normal log, got %q", code)
}
}