2021-11-13 02:07:07 -07:00
|
|
|
package cache
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestLoadCache(t *testing.T) {
|
|
|
|
expectedResult := [2]string{"hello/wer.jpg", "hello/iwer.jpg"}
|
2021-11-20 07:51:54 -07:00
|
|
|
LoadCache("./testdata/cache.txt")
|
2021-11-13 02:07:07 -07:00
|
|
|
var i int = 0
|
|
|
|
for _, v := range CACHE_LIST {
|
|
|
|
if v != expectedResult[i] {
|
|
|
|
if v != expectedResult[i+1] {
|
|
|
|
t.Errorf("Didn't Get The Expected Value receieved %s", v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|