(t *testing.T)
| 97 | } |
| 98 | |
| 99 | func TestStringifyMap(t *testing.T) { |
| 100 | out := stringifyMap(map[string]interface{}{ |
| 101 | "a": "x", "n": float64(3), "b": true, "list": []interface{}{"p", "q"}, "skip": nil, |
| 102 | }) |
| 103 | if out["a"] != "x" || out["n"] != "3" || out["b"] != "true" || out["list"] != "p, q" { |
| 104 | t.Errorf("stringifyMap wrong: %v", out) |
| 105 | } |
| 106 | if _, ok := out["skip"]; ok { |
| 107 | t.Error("nil values should be skipped") |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func TestParseMemoryInvocation_Envelope(t *testing.T) { |
| 112 | cmd, inner, err := parseMemoryInvocation([]string{`{"cmd":"remember","args":{"content":"x","category":"personal"}}`}) |
nothing calls this directly
no test coverage detected