psi: made some comments in psi_test.go more english like and corrected some errors

This commit is contained in:
saxon 2019-01-10 17:34:54 +10:30
parent b6c0433476
commit f752712dec
1 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ import (
// Some common manifestations of PSI // Some common manifestations of PSI
var ( var (
// PSI struct to represent basic pat // standardPat is a minimal PAT.
standardPat = PSI{ standardPat = PSI{
Pf: 0x00, Pf: 0x00,
Tid: 0x00, Tid: 0x00,
@ -53,7 +53,7 @@ var (
}, },
} }
// PSI struct to represent basic pmt without descriptors for time and location // standardPmt is a minimal PMT, without time and location descriptors.
standardPmt = PSI{ standardPmt = PSI{
Pf: 0x00, Pf: 0x00,
Tid: 0x02, Tid: 0x02,
@ -77,7 +77,7 @@ var (
}, },
} }
// Std pmt with time and location descriptors, time and location fields are zeroed out // standardPmtTimeLocation is a minimal PMT with time and location descriptors.
standardPmtTimeLocation = PSI{ standardPmtTimeLocation = PSI{
Pf: 0x00, Pf: 0x00,
Tid: 0x02, Tid: 0x02,
@ -189,14 +189,14 @@ var bytesTests = []struct {
// Pat test // Pat test
{ {
name: "pat Bytes()", name: "pat Bytes()",
input: StandardPat, input: standardPat,
want: StandardPatBytes, want: StandardPatBytes,
}, },
// Pmt test data no descriptor // Pmt test data no descriptor
{ {
name: "pmt to Bytes() without descriptors", name: "pmt to Bytes() without descriptors",
input: StandardPmt, input: standardPmt,
want: StandardPmtBytes, want: StandardPmtBytes,
}, },
@ -326,7 +326,7 @@ func TestTimeGet(t *testing.T) {
// TestLocationGet checks that we can correctly get location data from a pmt table // TestLocationGet checks that we can correctly get location data from a pmt table
func TestLocationGet(t *testing.T) { func TestLocationGet(t *testing.T) {
pb := StandardPmtTimeLocation.Bytes() pb := standardPmtTimeLocation.Bytes()
err := UpdateLocation(pb, locationTstStr1) err := UpdateLocation(pb, locationTstStr1)
if err != nil { if err != nil {
t.Errorf("Error for TestLocationGet UpdateLocation(pb, locationTstStr1): %v", err) t.Errorf("Error for TestLocationGet UpdateLocation(pb, locationTstStr1): %v", err)