aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/tests/test-all
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_core/tests/test-all')
-rw-r--r--mingling_core/tests/test-all/tests/integration.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/mingling_core/tests/test-all/tests/integration.rs b/mingling_core/tests/test-all/tests/integration.rs
index 3581702..d36b9df 100644
--- a/mingling_core/tests/test-all/tests/integration.rs
+++ b/mingling_core/tests/test-all/tests/integration.rs
@@ -1,13 +1,12 @@
use mingling::Flag;
-use mingling::StructuralRenderer;
-use mingling::StructuralRendererSetting;
-use mingling::MockProgramCollect;
use mingling::NextProcess;
-use mingling::StructuralData;
use mingling::Node;
use mingling::Program;
use mingling::RenderResult;
use mingling::StringVec;
+use mingling::StructuralData;
+use mingling::StructuralRenderer;
+use mingling::StructuralRendererSetting;
use mingling::comp::{ShellContext, ShellFlag, Suggest};
use mingling::core_res::ResREPL;
use mingling::hook::ProgramHook;
@@ -86,7 +85,7 @@ fn test_render_result_default() {
fn test_render_result_print() {
let mut r = RenderResult::default();
r.print("hello");
- assert_eq!(&*r, "hello");
+ assert_eq!(r.to_string().as_str(), "hello");
}
// StructuralRenderer
@@ -125,13 +124,13 @@ fn test_structural_renderer_json() {
#[test]
fn test_is_completing() {
- let program: Program<MockProgramCollect> = Program::new_with_args(["app", "__comp"]);
+ let program: Program<crate::ThisProgram> = Program::new_with_args(["app", "__comp"]);
assert!(program.is_completing());
}
#[test]
fn test_is_not_completing() {
- let program: Program<MockProgramCollect> = Program::new_with_args(["app", "greet"]);
+ let program: Program<crate::ThisProgram> = Program::new_with_args(["app", "greet"]);
assert!(!program.is_completing());
}
@@ -141,7 +140,7 @@ fn test_is_not_completing() {
fn test_hook_setup() {
static CALLED: AtomicBool = AtomicBool::new(false);
- let hook = ProgramHook::<MockProgramCollect>::empty().on_begin::<_, ()>(|_| {
+ let hook = ProgramHook::<crate::ThisProgram>::empty().on_begin::<_, ()>(|_| {
CALLED.store(true, Ordering::SeqCst);
});
@@ -166,3 +165,5 @@ fn test_string_vec_from_array() {
let v: Vec<String> = sv.into();
assert_eq!(v, vec!["a", "b", "c"]);
}
+
+mingling::macros::gen_program!();