Skip to content

Commit

Permalink
Add indexed json tests for JSON_REPLACE and JSON_SET
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktobey committed Jul 8, 2024
1 parent 094ba06 commit 6a4134c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions go/store/prolly/tree/json_indexed_document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,28 @@ func TestIndexedJsonDocument_Extract(t *testing.T) {
jsontests.RunJsonTests(t, testCases)
}

func TestIndexedJsonDocument_Replace(t *testing.T) {
ctx := context.Background()
ns := NewTestNodeStore()
convertToIndexedJsonDocument := func(t *testing.T, s interface{}) interface{} {
return newIndexedJsonDocumentFromValue(t, ctx, ns, s)
}

testCases := jsontests.JsonReplaceTestCases(t, convertToIndexedJsonDocument)
jsontests.RunJsonTests(t, testCases)
}

func TestIndexedJsonDocument_Set(t *testing.T) {
ctx := context.Background()
ns := NewTestNodeStore()
convertToIndexedJsonDocument := func(t *testing.T, s interface{}) interface{} {
return newIndexedJsonDocumentFromValue(t, ctx, ns, s)
}

testCases := jsontests.JsonSetTestCases(t, convertToIndexedJsonDocument)
jsontests.RunJsonTests(t, testCases)
}

func TestIndexedJsonDocument_Value(t *testing.T) {
ctx := context.Background()
ns := NewTestNodeStore()
Expand Down

0 comments on commit 6a4134c

Please sign in to comment.