package main import ( "io/ioutil" "testing" ) // TestProbe reads a given video file and writes the sharpness and contrast scores to a turbidity probe func TestProbe(t *testing.T) { ts := new(turbidityProbe) video, err := ioutil.ReadFile("logo.h264") if err != nil { t.Fatalf("failed to read file: %v", err) } _, err = ts.Write(video) if err != nil { t.Fatalf("failed to write sharpness and contrast: %v", err) } t.Logf("contrast: %v, sharpness: %v\n", ts.contrast, ts.sharpness) }