From 474b3a324ad17700d85717a7926b8bf53cb16987 Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Thu, 3 Jan 2019 02:08:55 +0000 Subject: [PATCH] removing changes not relevant to this PR --- stream/mts/psi/psi_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stream/mts/psi/psi_test.go b/stream/mts/psi/psi_test.go index d6d6d1cc..6d5595f0 100644 --- a/stream/mts/psi/psi_test.go +++ b/stream/mts/psi/psi_test.go @@ -91,10 +91,10 @@ var ( } // Bytes representing pmt with time1 and location1 - pmtTimeLocBytes1 = buildPmtTimeLocBytes(locationTstStr1) + pmtTimeLocationBytes1 = buildPmtTimeLocationBytes(locationTstStr1) // bytes representing pmt with with time1 and location 2 - pmtTimeLocBytes2 = buildPmtTimeLocBytes(locationTstStr2) + pmtTimeLocationBytes2 = buildPmtTimeLocationBytes(locationTstStr2) ) // bytesTests contains data for testing the Bytes() funcs for the PSI data struct @@ -257,23 +257,23 @@ func TestLocationGet(t *testing.T) { // TestLocationUpdate checks to see if we can update the location string in a pmt correctly func TestLocationUpdate(t *testing.T) { - cpy := make([]byte, len(pmtTimeLocBytes1)) - copy(cpy, pmtTimeLocBytes1) + cpy := make([]byte, len(pmtTimeLocationBytes1)) + copy(cpy, pmtTimeLocationBytes1) cpy = addCrc(cpy) err := UpdateLocation(cpy, locationTstStr2) cpy = cpy[:len(cpy)-4] if err != nil { t.Errorf("Update time returned err: %v", err) } - if !bytes.Equal(pmtTimeLocBytes2, cpy) { - t.Errorf(errCmp, "TestLocationUpdate", pmtTimeLocBytes2, cpy) + if !bytes.Equal(pmtTimeLocationBytes2, cpy) { + t.Errorf(errCmp, "TestLocationUpdate", pmtTimeLocationBytes2, cpy) } } // buildPmtTimeLocationBytes is a helper function to help construct the byte slices // for pmts with time and location, as the location data field is 32 bytes, i.e. quite large // to type out -func buildPmtTimeLocBytes(tstStr string) []byte { +func buildPmtTimeLocationBytes(tstStr string) []byte { return append(append(append(make([]byte, 0), pmtTimeLocationBytesPart1...), LocationStrBytes(tstStr)...), pmtTimeLocationBytesPart2...) }