diff --git a/main_test.go b/main_test.go deleted file mode 100644 index 593a60b..0000000 --- a/main_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "fmt" - "testing" -) - -func TestDownloader(t *testing.T) { - urls := []string{"https://www.youtube.com/watch?v=HpNluHOAJFA&list=RDHpNluHOAJFA"} - - if err := beginDownload(urls); err != nil { - fmt.Fprintln("Error occured testing downloader", err) - } -} diff --git a/video_extractor_test.go b/video_extractor_test.go index 7717583..fa1f27f 100644 --- a/video_extractor_test.go +++ b/video_extractor_test.go @@ -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) @@ -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) } }*/