blob: c719d841cabe4432d70c3906985cd94433bf03bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#![cfg(target_arch = "wasm32")]
use wasm_bindgen_test::*;
use serde_dhall::{from_str, FromDhall, StaticType};
#[wasm_bindgen_test]
fn test() {
fn parse<T: FromDhall + StaticType>(s: &str) -> T {
from_str(s).static_type_annotation().parse().unwrap()
}
assert_eq!(parse::<Vec<u64>>("[1, 2]"), vec![1, 2]);
}
|