mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 04:20:17 +00:00
Bumping coverage
checking all the corners for cobwebs
This commit is contained in:
@@ -41,3 +41,18 @@ func Benchmark_CompareOpenAPIDocuments(b *testing.B) {
|
||||
CompareOpenAPIDocuments(origDoc, modDoc)
|
||||
}
|
||||
}
|
||||
|
||||
func Benchmark_CompareOpenAPIDocuments_NoChange(b *testing.B) {
|
||||
|
||||
original, _ := ioutil.ReadFile("../test_specs/burgershop.openapi.yaml")
|
||||
modified, _ := ioutil.ReadFile("../test_specs/burgershop.openapi.yaml")
|
||||
|
||||
infoOrig, _ := datamodel.ExtractSpecInfo(original)
|
||||
infoMod, _ := datamodel.ExtractSpecInfo(modified)
|
||||
origDoc, _ := v3.CreateDocument(infoOrig)
|
||||
modDoc, _ := v3.CreateDocument(infoMod)
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
CompareOpenAPIDocuments(origDoc, modDoc)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user