feat: add dependency
This commit is contained in:
15
javascript-engine/external/boa/boa_macros/tests/utf16.rs
vendored
Normal file
15
javascript-engine/external/boa/boa_macros/tests/utf16.rs
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
use boa_macros::utf16;
|
||||
|
||||
#[test]
|
||||
fn literal() {
|
||||
let utf16 = utf16!("hello!");
|
||||
let manual = "hello!".encode_utf16().collect::<Vec<_>>();
|
||||
assert_eq!(manual, utf16);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn utf16() {
|
||||
let utf16 = utf16!("hello!😁😁😁");
|
||||
let manual = "hello!😁😁😁".encode_utf16().collect::<Vec<_>>();
|
||||
assert_eq!(manual, utf16);
|
||||
}
|
||||
Reference in New Issue
Block a user