From 83e4a4c5c52c5c206f0f120b669f4e572e2fe176 Mon Sep 17 00:00:00 2001 From: saxon Date: Mon, 7 Jan 2019 16:58:12 +1030 Subject: [PATCH] psi: removing uneccessary conversion in psi_test.go --- stream/mts/psi/psi_test.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/stream/mts/psi/psi_test.go b/stream/mts/psi/psi_test.go index 3971601a..0066cb5c 100644 --- a/stream/mts/psi/psi_test.go +++ b/stream/mts/psi/psi_test.go @@ -60,11 +60,11 @@ var ( var ( pmtTimeLocationBytesPart1 = []byte{ 0x00, 0x02, 0xb0, 0x12, 0x00, 0x01, 0xc1, 0x00, 0x00, 0xe1, 0x00, 0xf0, 0x0a, - byte(timeDescTag), // Descriptor tag for timestamp - byte(timeDataSize), // Length of bytes to follow + timeDescTag, // Descriptor tag for timestamp + timeDataSize, // Length of bytes to follow 0x00, 0x00, 0x00, 0x00, 0x67, 0x6F, 0x74, 0x5F, // Timestamp data - byte(locationDescTag), // Descriptor tag for location - byte(locationDataSize), // Length of bytes to follow + locationDescTag, // Descriptor tag for location + locationDataSize, // Length of bytes to follow } pmtTimeLocationBytesPart2 = []byte{ 0x1b, 0xe1, 0x00, 0xf0, 0x00, @@ -75,8 +75,8 @@ var ( // Bytes representing pmt with tstTime1 pmtTimeBytes1 = []byte{ 0x00, 0x02, 0xb0, 0x12, 0x00, 0x01, 0xc1, 0x00, 0x00, 0xe1, 0x00, 0xf0, 0x0a, - byte(timeDescTag), // Descriptor tag - byte(timeDataSize), // Length of bytes to follow + timeDescTag, // Descriptor tag + timeDataSize, // Length of bytes to follow 0x00, 0x00, 0x00, 0x00, 0x49, 0xA2, 0x36, 0x0B, // timestamp 0x1b, 0xe1, 0x00, 0xf0, 0x00, } @@ -84,8 +84,8 @@ var ( // Bytes representing pmt with tstTime 2 pmtTimeBytes2 = []byte{ 0x00, 0x02, 0xb0, 0x12, 0x00, 0x01, 0xc1, 0x00, 0x00, 0xe1, 0x00, 0xf0, 0x0a, - byte(timeDescTag), // Descriptor tag - byte(timeDataSize), // Length of bytes to follow + timeDescTag, // Descriptor tag + timeDataSize, // Length of bytes to follow 0x00, 0x00, 0x00, 0x00, 0x67, 0x6F, 0x74, 0x5F, // timestamp 0x1b, 0xe1, 0x00, 0xf0, 0x00, } @@ -124,9 +124,9 @@ var bytesTests = []struct { Pf: 0x00, Tid: 0x02, Ssi: true, - Sl: uint16(0x12), + Sl: 0x12, Tss: &TSS{ - Tide: uint16(0x01), + Tide: 0x01, V: 0, Cni: true, Sn: 0, @@ -136,8 +136,8 @@ var bytesTests = []struct { Pil: 10, Pd: []Desc{ Desc{ - Dt: byte(timeDescTag), - Dl: byte(timeDataSize), + Dt: timeDescTag, + Dl: timeDataSize, Dd: TimeBytes(tstTime1), }, }, @@ -159,9 +159,9 @@ var bytesTests = []struct { Pf: 0x00, Tid: 0x02, Ssi: true, - Sl: uint16(0x12), + Sl: 0x12, Tss: &TSS{ - Tide: uint16(0x01), + Tide: 0x01, V: 0, Cni: true, Sn: 0, @@ -171,13 +171,13 @@ var bytesTests = []struct { Pil: 10, Pd: []Desc{ Desc{ - Dt: byte(timeDescTag), - Dl: byte(timeDataSize), + Dt: timeDescTag, + Dl: timeDataSize, Dd: TimeBytes(tstTime2), }, Desc{ - Dt: byte(locationDescTag), - Dl: byte(locationDataSize), + Dt: locationDescTag, + Dl: locationDataSize, Dd: LocationStrBytes(locationTstStr1), }, },