mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 12:37:49 +00:00
working with k8s, stripe, petstore and locals. Speed is as good as I can make it at this point, not without further performance tunupes for memory consumption. less copying everywhere.
21 lines
559 B
Go
21 lines
559 B
Go
// Copyright 2022 Princess B33f Heavy Industries / Dave Shanley
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package high
|
|
|
|
import (
|
|
"github.com/pb33f/libopenapi/datamodel/low"
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestExtractExtensions(t *testing.T) {
|
|
n := make(map[low.KeyReference[string]]low.ValueReference[any])
|
|
n[low.KeyReference[string]{
|
|
Value: "pb33f",
|
|
}] = low.ValueReference[any]{
|
|
Value: "new cowboy in town",
|
|
}
|
|
ext := ExtractExtensions(n)
|
|
assert.Equal(t, "new cowboy in town", ext["pb33f"])
|
|
} |