Skip to content

Commit

Permalink
Test for RC4 copied cipher.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfdecyf committed Mar 25, 2013
1 parent aafcda8 commit 24dd810
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shadowsocks/encrypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ func TestRC4Cipher(t *testing.T) {
t.Error("Should get error for empty key creating rc4 cipher")
}
cipher, err = NewCipher("rc4", "Alibaba")
ciphercopy := cipher.Copy()
if err != nil {
t.Error("Should not error creating rc4 cipher with key Alibaba")
}
if _, ok := cipher.(*RC4Cipher); !ok {
t.Error("Should get rc4 cipher")
} else {
testCiphter(t, cipher, "RC4Cipher")
testCiphter(t, ciphercopy, "RC4Cipher copy")
}
}

0 comments on commit 24dd810

Please sign in to comment.