package main import ( "runtime" "testing" ) func TestMessageBoxW_WindowsOnly(t *testing.T) { if runtime.GOOS != "windows" { t.Skip("MessageBoxW 仅在 Windows 上测试") } messageBox("测试标题", "测试消息", MB_ICONINFORMATION) } func TestShowError_WindowsBranch(t *testing.T) { if runtime.GOOS != "windows" { t.Skip("Windows 原生对话框测试仅在 Windows 上运行") } showError("测试错误", "这是一条测试错误消息") } func TestShowAbout_WindowsBranch(t *testing.T) { if runtime.GOOS != "windows" { t.Skip("Windows 原生对话框测试仅在 Windows 上运行") } showAbout() }