Skip to content

Commit

Permalink
Test ParseNextFrame()
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-wa committed May 3, 2018
1 parent 0c5b88b commit 6f012ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions demoinfocs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ func TestDemoInfoCs(t *testing.T) {
}
}()

frameByFrameCount := 1000
fmt.Printf("Parsing frame by frame (%d frames)\n", frameByFrameCount)
for i := 0; i < frameByFrameCount; i++ {
ok, err := p.ParseNextFrame()
if err != nil {
t.Fatal(err)
}
if !ok {
t.Fatalf("Parser reported end of demo after less than %d frames", frameByFrameCount)
}
}

fmt.Println("Parsing to end")
err = p.ParseToEnd()
if err != nil {
Expand Down

0 comments on commit 6f012ae

Please sign in to comment.