Verifies: SYS-REQ-082 [malformed] GetUnsafeString on truncated-at-value-boundary input shall return error.
(t *testing.T)
| 819 | // Verifies: SYS-REQ-082 [malformed] |
| 820 | // GetUnsafeString on truncated-at-value-boundary input shall return error. |
| 821 | func TestGetUnsafeStringTruncatedValue(t *testing.T) { |
| 822 | func() { |
| 823 | defer func() { |
| 824 | if r := recover(); r != nil { |
| 825 | t.Fatalf("GetUnsafeString on truncated input panicked: %v", r) |
| 826 | } |
| 827 | }() |
| 828 | _, err := GetUnsafeString([]byte(`{"a":1`), "a") |
| 829 | // Accept error or best-effort result, as long as no panic |
| 830 | _ = err |
| 831 | }() |
| 832 | } |
| 833 | |
| 834 | // ============================================================================= |
| 835 | // ArrayEach truncated at value boundary (SYS-REQ-083) |
nothing calls this directly
no test coverage detected