#![cfg(feature = "hit")]
#[cfg(test)]
mod pipeline_create_tests {
use depthai::camera::CameraNode;
use depthai::common::CameraBoardSocket;
use depthai::pipeline::Pipeline;
use depthai::pipeline::{DeviceNode, DeviceNodeWithParams};
#[test]
#[ignore] fn test_create_with_camera_node() {
let pipeline = Pipeline::new().build().expect("Failed to create pipeline");
let camera = pipeline
.create_with::<CameraNode, _>(CameraBoardSocket::CamA)
.expect("Failed to create camera node");
use depthai::camera::CameraOutputConfig;
let config = CameraOutputConfig::new((640, 400));
let _output = camera
.request_output(config)
.expect("Failed to request camera output");
}
#[test]
fn test_trait_bounds_compile() {
fn _generic_create_test<T: DeviceNode>(pipeline: &Pipeline) -> depthai::Result<T> {
pipeline.create::<T>()
}
fn _generic_create_with_test<T: DeviceNodeWithParams<P>, P>(
pipeline: &Pipeline,
params: P,
) -> depthai::Result<T> {
pipeline.create_with::<T, P>(params)
}
}
}