test with more laws
This commit is contained in:
parent
68fd81d308
commit
cf2e978465
6993
data/abgb.json
Normal file
6993
data/abgb.json
Normal file
File diff suppressed because it is too large
Load Diff
6983
data/urhg.json
Normal file
6983
data/urhg.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -185,4 +185,34 @@ mod tests {
|
||||
|
||||
assert!(wrapper.is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deserialize_abgb_success() {
|
||||
let mut file = File::open("data/abgb.json").unwrap();
|
||||
let mut json = String::new();
|
||||
file.read_to_string(&mut json).unwrap();
|
||||
|
||||
let wrapper: serde_json::Result<Wrapper> = serde_json::from_str(&json);
|
||||
if wrapper.is_err() {
|
||||
let dbg = wrapper.as_ref().err().unwrap();
|
||||
println!("{dbg:#?}");
|
||||
}
|
||||
|
||||
assert!(wrapper.is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deserialize_urhg_success() {
|
||||
let mut file = File::open("data/urhg.json").unwrap();
|
||||
let mut json = String::new();
|
||||
file.read_to_string(&mut json).unwrap();
|
||||
|
||||
let wrapper: serde_json::Result<Wrapper> = serde_json::from_str(&json);
|
||||
if wrapper.is_err() {
|
||||
let dbg = wrapper.as_ref().err().unwrap();
|
||||
println!("{dbg:#?}");
|
||||
}
|
||||
|
||||
assert!(wrapper.is_ok());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user