mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
16 lines
345 B
Go
16 lines
345 B
Go
package http
|
|
|
|
import "testing"
|
|
|
|
func TestOptsExtra_Checksum(t *testing.T) {
|
|
extra := &OptsExtra{
|
|
Checksum: &ChecksumOption{
|
|
Algorithm: "sha256",
|
|
Expected: "abcdef1234567890",
|
|
},
|
|
}
|
|
if extra.Checksum.Algorithm != "sha256" || extra.Checksum.Expected != "abcdef1234567890" {
|
|
t.Fatalf("unexpected checksum: %+v", extra.Checksum)
|
|
}
|
|
}
|