返回 DeepSeek-Reasonix
identity_test.go
根目录 / internal / appidentity / identity_test.go
1 package appidentity
2
3 import (
4 "strings"
5 "testing"
6 )
7
8 func TestAppUserModelIDIsStableAndVersionIndependent(t *testing.T) {
9 if AppUserModelID != "io.reasonix.desktop" {
10 t.Fatalf("AppUserModelID = %q, want stable desktop identity %q", AppUserModelID, "io.reasonix.desktop")
11 }
12 if strings.ContainsAny(AppUserModelID, " \t\r\n") || len(AppUserModelID) > 128 {
13 t.Fatalf("invalid AppUserModelID %q", AppUserModelID)
14 }
15 }
16
17 func TestAppUserModelIDDoesNotMergeStudio(t *testing.T) {
18 for _, studioID := range []string{legacyAppUserModelID, studioAppUserModelID} {
19 if AppUserModelID == studioID {
20 t.Fatalf("desktop identity must not share Studio identity %q", studioID)
21 }
22 }
23 }
24
25 func TestAppUserModelIDDoesNotMergeLegacyTauriDesktop(t *testing.T) {
26 if AppUserModelID == legacyTauriAppUserModelID {
27 t.Fatalf("current AppUserModelID %q must remain distinct from Reasonix Desktop 0.53", AppUserModelID)
28 }
29 }
30
30 lines GO