Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyah Check committed Jan 3, 2020
1 parent 1d4a0de commit 089cb0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
14 changes: 0 additions & 14 deletions main_test.go

This file was deleted.

14 changes: 12 additions & 2 deletions video_extractor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,22 @@ func TestApi(t *testing.T) {

if ID != "" {
if err := getVideoStream("mp3", ID, path, 192); err != nil {
t.Errorf("APIvideoStream(%d): expected %v, actual %v", i, nil, err)
t.Errorf("videoStream(%d): expected %v, actual %v", i, nil, err)
}
}
}
}

func TestVideoId(t *testing.T) {
urls := []string{"https://www.youtube.com/watch?v=HpNluHOAJFA&list=RDHpNluHOAJFA"}

url, err := getVideoId(urls[0])
if err != nil {
t.Log(err)
}
t.Log(url)
}

func BenchmarkVideoId(b *testing.B) {
for n := 0; n < b.N; n++ {
getVideoId(tables[0].url)
Expand All @@ -51,6 +61,6 @@ func BenchmarkApivideoStream(b *testing.B) {
path := "~/Downloads/"
for n := 0; n < b.N; n++ {
file := path + tables[0].id + ".mp3"
APIConvertVideo(file, 123, tables[0].id, vid)
convertVideo(file, 123, tables[0].id, vid)
}
}*/

0 comments on commit 089cb0a

Please sign in to comment.