Skip to content

Commit 61d2670

Browse files
committed
Added unit tests for deterministic propagation in empty causable collections, including explain method validation.
Signed-off-by: Marvin Hansen <[email protected]>
1 parent c17254d commit 61d2670

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

deep_causality/tests/extensions/causable/causable_empty_tests.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* Copyright (c) "2025" . The DeepCausality Authors and Contributors. All Rights Reserved.
44
*/
55
use deep_causality::{
6-
AggregateLogic, BaseCausaloid, CausableCollectionReasoning, PropagatingEffect,
6+
AggregateLogic, BaseCausaloid, CausableCollectionExplaining, CausableCollectionReasoning,
7+
PropagatingEffect,
78
};
89

910
#[test]
@@ -13,6 +14,15 @@ fn test_get_all_items_empty() {
1314
assert_eq!(exp_len, 0);
1415
}
1516

17+
#[test]
18+
fn test_explain_deterministic_propagation_empty() {
19+
let col: [BaseCausaloid; 0] = [];
20+
let exp_len = col.len();
21+
assert_eq!(exp_len, 0);
22+
let res = col.explain();
23+
assert!(res.is_err());
24+
}
25+
1626
#[test]
1727
fn test_evaluate_deterministic_propagation_empty() {
1828
let col: [BaseCausaloid; 0] = [];

0 commit comments

Comments
 (0)