First steps to test cases
This commit is contained in:
parent
fddb910175
commit
6faa910aef
|
@ -0,0 +1,22 @@
|
|||
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(())
|
||||
}
|
Loading…
Reference in New Issue