Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package proto
import (
"encoding/json"
"testing"
)
func TestPingResponsesIncludeShortDramaCardID(t *testing.T) {
const productID = "6a8f066778316ccfc08c4ce7"
responses := []any{
SysInfo{ShortDramaCardID: productID},
SysInfos{ShortDramaCardID: productID},
}
for _, response := range responses {
data, err := json.Marshal(response)
if err != nil {
t.Fatal(err)
}
var decoded map[string]any
if err = json.Unmarshal(data, &decoded); err != nil {
t.Fatal(err)
}
if got := decoded["shortDramaCardId"]; got != productID {
t.Fatalf("shortDramaCardId = %v, want %s", got, productID)
}
}
}