mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Added support for unevaluatedProperties as Schema and bool #118
Also ran `gofmt` across the entire project. Things need cleaning up. Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -4,22 +4,22 @@
|
||||
package index
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSpecIndex_Children(t *testing.T) {
|
||||
idx1 := new(SpecIndex)
|
||||
idx2 := new(SpecIndex)
|
||||
idx3 := new(SpecIndex)
|
||||
idx4 := new(SpecIndex)
|
||||
idx5 := new(SpecIndex)
|
||||
idx1.AddChild(idx2)
|
||||
idx1.AddChild(idx3)
|
||||
idx3.AddChild(idx4)
|
||||
idx4.AddChild(idx5)
|
||||
assert.Equal(t, 2, len(idx1.GetChildren()))
|
||||
assert.Equal(t, 1, len(idx3.GetChildren()))
|
||||
assert.Equal(t, 1, len(idx4.GetChildren()))
|
||||
assert.Equal(t, 0, len(idx5.GetChildren()))
|
||||
idx1 := new(SpecIndex)
|
||||
idx2 := new(SpecIndex)
|
||||
idx3 := new(SpecIndex)
|
||||
idx4 := new(SpecIndex)
|
||||
idx5 := new(SpecIndex)
|
||||
idx1.AddChild(idx2)
|
||||
idx1.AddChild(idx3)
|
||||
idx3.AddChild(idx4)
|
||||
idx4.AddChild(idx5)
|
||||
assert.Equal(t, 2, len(idx1.GetChildren()))
|
||||
assert.Equal(t, 1, len(idx3.GetChildren()))
|
||||
assert.Equal(t, 1, len(idx4.GetChildren()))
|
||||
assert.Equal(t, 0, len(idx5.GetChildren()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user