|
|
@ -1,6 +1,7 @@ |
|
|
|
extern crate uci; |
|
|
|
extern crate uci; |
|
|
|
|
|
|
|
|
|
|
|
use uci::Engine; |
|
|
|
use uci::Engine; |
|
|
|
|
|
|
|
use std::str; |
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
#[test] |
|
|
|
fn instantiate_new_engine() { |
|
|
|
fn instantiate_new_engine() { |
|
|
@ -23,11 +24,9 @@ fn send_indentification_data() { |
|
|
|
e.identify(); |
|
|
|
e.identify(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
println!("HERE!!!!!!!"); |
|
|
|
// NOTE: This looks weird bceause you'd think it would store each insertion into the output buffer
|
|
|
|
println!("{:?}") |
|
|
|
// as a separate element of that buffer, but it really just appends the two strings since in reality
|
|
|
|
|
|
|
|
// the buffer would be flushed after reading.
|
|
|
|
|
|
|
|
assert_eq!(str::from_utf8(&output).unwrap_or("Unwrapping output failed in test #2"), |
|
|
|
// To get this to play nicely the vector needs to be converted to utf-8 string(s) for comparison
|
|
|
|
"id name test_name\nid author test\n"); |
|
|
|
|
|
|
|
|
|
|
|
//assert_eq!(output, [b"id name test_name\n", b"id author test\n"]);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|