use super::*; from_examples!(DMN_3_0011); #[bench] fn _0001(b: &mut Bencher) { let ctx = context(r#"{nestedList: [["o"], ["p", "q"]], position: 2, simpleList: ["a", "b", "c"]}"#); let invocable_name = "literalNestedList"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[["a", "b"], ["b", "c"]]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0002(b: &mut Bencher) { let ctx = context(r#"{nestedList: [["o"], ["p", "q"]], position: 2, simpleList: ["a", "b", "c"]}"#); let invocable_name = "remove1"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"["a", "c"]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0003(b: &mut Bencher) { let ctx = context(r#"{nestedList: [["o"], ["p", "q"]], position: 2, simpleList: ["a", "b", "c"]}"#); let invocable_name = "insert3"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[["o"], ["a", "b", "c"], ["p", "q"]]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0004(b: &mut Bencher) { let ctx = context(r#"{nestedList: [["o"], ["p", "q"]], position: 2, simpleList: ["a", "b", "c"]}"#); let invocable_name = "insert2"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[["a", "b"], ["a", "b", "c"], ["b", "c"]]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0005(b: &mut Bencher) { let ctx = context(r#"{nestedList: [["o"], ["p", "q"]], position: 2, simpleList: ["a", "b", "c"]}"#); let invocable_name = "remove2"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[["a", "b"]]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0006(b: &mut Bencher) { let ctx = context(r#"{nestedList: [["o"], ["p", "q"]], position: 2, simpleList: ["a", "b", "c"]}"#); let invocable_name = "insert1"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"["a", "x", "b", "c"]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); }