()
| 984 | |
| 985 | #[test] |
| 986 | fn test_decide_sharing_simple() { |
| 987 | // Create expression with repeated subterm |
| 988 | let ty = Expr::sort(0); |
| 989 | let lam1 = Expr::lam(ty.clone(), Expr::var(0)); |
| 990 | let lam2 = Expr::lam(ty.clone(), Expr::var(1)); |
| 991 | let app = Expr::app(lam1, lam2); |
| 992 | |
| 993 | let (info_map, _, topo_order) = analyze_block(&[app], false); |
| 994 | let shared = decide_sharing(&info_map, &topo_order); |
| 995 | |
| 996 | // ty (Sort(0)) appears twice, might be shared depending on size |
| 997 | // This is a basic smoke test |
| 998 | assert!(shared.len() <= info_map.len()); |
| 999 | } |
| 1000 | |
| 1001 | #[test] |
| 1002 | fn test_topological_sort() { |
nothing calls this directly
no test coverage detected