23 lines
586 B
Rust
23 lines
586 B
Rust
use std::io;
|
|
use std::io::Read;
|
|
|
|
use oo::*;
|
|
|
|
#[test]
|
|
fn read_samples_text() -> io::Result<()> {
|
|
let mut fh = std::fs::File::open("../../../tests/samples.pr")?;
|
|
let mut contents = String::new();
|
|
fh.read_to_string(&mut contents)?;
|
|
println!("{:#?}", annotated_iovalue_from_str(&contents)?);
|
|
Ok(())
|
|
}
|
|
|
|
#[test]
|
|
fn read_samples_bin() -> io::Result<()> {
|
|
let mut fh = std::fs::File::open("../../../tests/samples.bin")?;
|
|
let mut contents = Vec::new();
|
|
fh.read_to_end(&mut contents)?;
|
|
println!("{:#?}", annotated_iovalue_from_bytes(&contents)?);
|
|
Ok(())
|
|
}
|