Этот коммит содержится в:
Christopher Speller
2018-01-29 14:17:40 -08:00
коммит произвёл GitHub
родитель 8d66523ba7
Коммит 961c04cae9
1508 изменённых файлов: 182081 добавлений и 24688 удалений

14
vendor/github.com/stretchr/objx/fixture_test.go сгенерированный поставляемый
Просмотреть файл

@@ -1,8 +1,10 @@
package objx
package objx_test
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/objx"
"github.com/stretchr/testify/assert"
)
var fixtures = []struct {
@@ -79,20 +81,16 @@ var fixtures = []struct {
}
func TestFixtures(t *testing.T) {
for _, fixture := range fixtures {
m := MustFromJSON(fixture.data)
m := objx.MustFromJSON(fixture.data)
// get the value
t.Logf("Running get fixture: \"%s\" (%v)", fixture.name, fixture)
value := m.Get(fixture.get.(string))
// make sure it matches
assert.Equal(t, fixture.output, value.data,
assert.Equal(t, fixture.output, value.Data(),
"Get fixture \"%s\" failed: %v", fixture.name, fixture,
)
}
}