From a74fe97ec425577e61f825589152ba5a9a23db65 Mon Sep 17 00:00:00 2001 From: Yury Date: Fri, 6 Dec 2024 01:05:13 +0300 Subject: [PATCH] more tests for vn::RecognizeTextRequest --- cidre/src/vn/recognize_text_request.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cidre/src/vn/recognize_text_request.rs b/cidre/src/vn/recognize_text_request.rs index 009f7aa3..f62c1b37 100644 --- a/cidre/src/vn/recognize_text_request.rs +++ b/cidre/src/vn/recognize_text_request.rs @@ -117,7 +117,7 @@ extern "C" { #[cfg(test)] mod tests { - use crate::vn; + use crate::{ns, vn}; #[test] fn basics() { @@ -134,5 +134,13 @@ mod tests { assert!(request.automatically_detects_lang()); assert!(request.custom_words().is_empty()); + + // test if api throws... + + request.set_min_text_height(-10.0); + assert_eq!(request.min_text_height(), -10.0); + + request.set_recognition_langs(&ns::Array::new()); + assert!(request.recognition_langs().is_empty()); } }