diff options
Diffstat (limited to 'tests/lib.rs')
-rw-r--r-- | tests/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib.rs b/tests/lib.rs index c2c79cc..0003696 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -6,3 +6,11 @@ fn problem_1 () { let base64 = "SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t"; assert_eq!(matasano::hex_to_base64(hex), base64); } + +#[test] +fn problem_2 () { + let str1 = "1c0111001f010100061a024b53535009181c"; + let str2 = "686974207468652062756c6c277320657965"; + let expected = "746865206b696420646f6e277420706c6179"; + assert_eq!(matasano::fixed_xor(str1, str2), expected); +} |