Files
qfixpt/quickfix/datadictionary/field_def_test.go
2026-03-12 12:08:34 -03:00

27 lines
528 B
Go

package datadictionary_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/quickfixgo/quickfix/datadictionary"
)
func TestNewFieldDef(t *testing.T) {
ft := datadictionary.NewFieldType("aname", 11, "INT")
var tests = []struct {
required bool
}{
{false},
}
for _, test := range tests {
fd := datadictionary.NewFieldDef(ft, test.required)
assert.False(t, fd.IsGroup(), "field def is not a group")
assert.Equal(t, "aname", fd.Name())
assert.Equal(t, test.required, fd.Required())
}
}