streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

commit 275f47abeb6b02680a62c9e5f3178573c7cc76a8
parent 4bbac5ef1cfc52e51ff10e6513c5cfe80ab6a427
Author: Oliver Lowe <o@olowe.co>
Date:   Sat, 11 May 2024 20:21:30 +1000

internal/scte35: set correct EventIDCompliance in test

We found in the spec that it's actually true. Tests now pass as
expected!

Diffstat:
Minternal/scte35/scte35_test.go | 7++++---
Minternal/scte35/splice_info_test.go | 7+++++--
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/internal/scte35/scte35_test.go b/internal/scte35/scte35_test.go @@ -44,9 +44,10 @@ var samples = []sample{ Command: &Command{ Type: SpliceInsert, Insert: &Insert{ - ID: 0x4800008f, - OutOfNetwork: true, - SpliceTime: newuint64(0x07369c02e), + ID: 0x4800008f, + EventIDCompliance: true, + OutOfNetwork: true, + SpliceTime: newuint64(0x07369c02e), Duration: &BreakDuration{ AutoReturn: true, Duration: 0x00052ccf5, diff --git a/internal/scte35/splice_info_test.go b/internal/scte35/splice_info_test.go @@ -141,16 +141,19 @@ func TestDecodeSpliceInfo(t *testing.T) { if tt.want.Command.Insert != nil { want := *tt.want.Command.Insert got := *info.Command.Insert - if !reflect.DeepEqual(&want, got) { + if !reflect.DeepEqual(want, got) { t.Errorf("info command: want %+v, got %+v", want, got) if *want.SpliceTime != *got.SpliceTime { t.Logf("want splice time %d, got %d", want.SpliceTime, got.SpliceTime) } + if want.Duration.Duration != got.Duration.Duration { + t.Logf("want break duration %d, got %d", want.Duration.Duration, got.Duration.Duration) + } } } if !reflect.DeepEqual(tt.want, *info) { - t.Errorf("decode splice info: want %+v, got %+v", tt.want, info) + t.Errorf("decode splice info: want %+v, got %+v", tt.want, *info) t.Log(diffInfo(tt.want, *info)) } })