Crates.io | crypto-invert |
lib.rs | crypto-invert |
version | 1.0.1 |
source | src |
created_at | 2020-09-21 08:04:31.145649 |
updated_at | 2020-09-21 08:14:24.842764 |
description | Unicode Upside-Down Mapping |
homepage | |
repository | https://github.com/GalAster/crypto-moe |
max_upload_size | |
id | 291041 |
size | 20,347 |
extern crate crypto_invert;
use crypto_invert::{decode, encode};
#[test]
fn test_encoding() {
let r1 = encode("i love you!");
let r2 = encode("I LOVE YOU!");
assert_eq!(r1, "ᴉ ꞁoʌǝ ʎon¡");
assert_eq!(r2, "I ꞀOɅƎ ⅄O∩¡");
}
#[test]
fn test_decoding() {
let r1 = "i love you!";
let r2 = "I LOVE YOU!";
assert_eq!(decode(&encode(r1)), r1);
assert_eq!(decode(&encode(r2)), r2);
}