File tree Expand file tree Collapse file tree 3 files changed +29
-3
lines changed
tests/regression/27-inv_invariants Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ struct
125125 else remove Addr. NullPtr x
126126 in
127127 match is_top x, is_top y with
128- | true , true -> uop x y
128+ | true , true -> no_null (no_null ( uop x y) x) y
129129 | false , true -> no_null x y
130130 | true , false -> no_null y x
131131 | false , false -> cop x y
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ int main() {
66 if (r == NULL )
77 assert (r == NULL );
88 else
9- assert (r != NULL ); // TODO
9+ assert (r != NULL );
1010
1111 if (r != NULL )
12- assert (r != NULL ); // TODO
12+ assert (r != NULL );
1313 else
1414 assert (r == NULL );
1515
Original file line number Diff line number Diff line change 1+ #include <stddef.h>
2+ #include <assert.h>
3+
4+ struct node {
5+ struct node * left ;
6+ struct node * right ;
7+ int key ;
8+ };
9+
10+ // https://old.reddit.com/r/programminghorror/comments/jgrpcu/on_sedgewicks_original_presentation_for_llrb_trees/
11+ struct node * min (struct node * root ) {
12+ struct node * x = root ;
13+ while (x != NULL )
14+ x = x -> left ;
15+ if (x == NULL ) // WARN (dead branch)
16+ return NULL ;
17+ else
18+ return x ;
19+ }
20+
21+ int main () {
22+ struct node * root ;
23+ struct node * m = min (root );
24+ assert (m == NULL );
25+ return 0 ;
26+ }
You can’t perform that action at this time.
0 commit comments