use kdb_codec::*;
fn main() {
let nesting_depth = 110;
let mut bytes = Vec::new();
for _ in 0..nesting_depth {
bytes.push(0); bytes.push(0); bytes.extend_from_slice(&[0x01, 0x00, 0x00, 0x00]); }
bytes.push(250_u8); bytes.extend_from_slice(&[0x2A, 0x00, 0x00, 0x00]);
println!("Testing with {} nested levels", nesting_depth);
println!("MAX_RECURSION_DEPTH = {}", MAX_RECURSION_DEPTH);
match K::q_ipc_decode(&bytes, 1) {
Ok(_) => println!("ERROR: Should have failed!"),
Err(e) => println!("Good: Got error: {}", e),
}
}