MCPcopy Create free account
hub / github.com/buger/jsonparser / TestPropertySameTreeEquivalence

Function TestPropertySameTreeEquivalence

property_test.go:690–701  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Property: sameTree is reflexive and symmetric --------------------------------------------------------------------------- reqproof:proptest sameTree Verifies: SYS-REQ-009 [property]

(t *testing.T)

Source from the content-addressed store, hash-verified

688// reqproof:proptest sameTree
689// Verifies: SYS-REQ-009 [property]
690func TestPropertySameTreeEquivalence(t *testing.T) {
691 // Reflexive: sameTree(p,p) is true for any non-empty path.
692 reflexive := func(p []string) bool {
693 if len(p) == 0 {
694 return true
695 }
696 return sameTree(p, p)
697 }
698 if err := quick.Check(reflexive, &quick.Config{MaxCount: 2000}); err != nil {
699 t.Fatalf("sameTree not reflexive: %v", err)
700 }
701}
702
703// ---------------------------------------------------------------------------
704// Property: internalGet agrees with Get (Get is a thin projection)

Callers

nothing calls this directly

Calls 1

sameTreeFunction · 0.85

Tested by

no test coverage detected