============================================================================= Negative array index (SYS-REQ-047) ============================================================================= Verifies: SYS-REQ-047 [boundary] Negative array indices are not supported. Get shall return not-found.
(t *testing.T)
| 183 | // Verifies: SYS-REQ-047 [boundary] |
| 184 | // Negative array indices are not supported. Get shall return not-found. |
| 185 | func TestNegativeArrayIndex(t *testing.T) { |
| 186 | data := []byte(`{"arr":[10,20,30]}`) |
| 187 | _, _, _, err := Get(data, "arr", "[-1]") |
| 188 | if err == nil { |
| 189 | t.Fatal("Get with negative array index should return error") |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | // ============================================================================= |
| 194 | // Delete truncation tests (SYS-REQ-048, SYS-REQ-049, SYS-REQ-050, SYS-REQ-056) |