diff --git a/itch/5.0/ipo_quotation.go b/itch/5.0/ipo_quotation.go index d8fb37c..fd29524 100644 --- a/itch/5.0/ipo_quotation.go +++ b/itch/5.0/ipo_quotation.go @@ -61,7 +61,7 @@ func MakeIpoQuotation(stockLocate, trackingNumber uint16, timestamp time.Duratio StockLocate: stockLocate, TrackingNumber: trackingNumber, Timestamp: timestamp, - Stock: fmt.Sprintf("%-8s", stock), + Stock: stock, ReleaseTime: releaseTime, Qualifier: qualifier, Price: price, diff --git a/itch/5.0/ipo_quotation_test.go b/itch/5.0/ipo_quotation_test.go index 9da4603..9886cc8 100644 --- a/itch/5.0/ipo_quotation_test.go +++ b/itch/5.0/ipo_quotation_test.go @@ -5,7 +5,6 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" ) func TestMakeAndParseIpoQuotation(t *testing.T) { @@ -18,7 +17,7 @@ func TestMakeAndParseIpoQuotation(t *testing.T) { StockLocate: 0, TrackingNumber: 1, Timestamp: timeSinceMidnight, - Stock: "AAPL ", + Stock: "AAPL", ReleaseTime: timeSinceMidnight, Qualifier: QUALIFIER_ANTICIPATED, Price: 21, @@ -35,8 +34,7 @@ func TestMakeAndParseIpoQuotation(t *testing.T) { t.Errorf("error parsing event: %v", err) } - // Ignoring Stock field because the byte representation contains right-padded spacing, whilst the Struct has it trimmed - if !cmp.Equal(m, parsedEvent, cmpopts.IgnoreFields(IpoQuotation{}, "Stock")) { + if !cmp.Equal(m, parsedEvent) { t.Errorf("parsed event and original event are not equal:\n%v", cmp.Diff(m, parsedEvent)) } }