-
Notifications
You must be signed in to change notification settings - Fork 322
Conversation
2 similar comments
@@ -251,6 +255,15 @@ func TestDecodeMediaPlaylist(t *testing.T) { | |||
t.Errorf("Segment %v's title = %v (must = %q)", i, s.Title, titles[i]) | |||
} | |||
} | |||
if p.Count() != 522 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't better to use an assert here? I'm new to golang anyway
assert.Equal(t, 522, p.Count(), "Expected segments quantity: 522.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If yes I think there is lots of places where it can be asserted instead of conditional checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes Leandro, I use assert
to write test cases in some of my projects, it seems good.
But the assert
is not contained in Golang's official packages, I do not want to introduce a 3rd package for the time being, I hope keep this project to be simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I didn't know, thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, LGTM
Add
MediaSegment.SeqId
support.