source: src/tests/avltree/avl0.c @ 3dcd347a

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglergc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 3dcd347a was 3dcd347a, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

moved some more tests to new test folder

  • Property mode set to 100644
File size: 288 bytes
Line 
1#include "avl.h"
2
3forall(otype T | Comparable(T))
4int ?==?(T t1, T t2) {
5  return !(t1 < t2) && !(t2 < t1);
6}
7
8forall(otype T | Comparable(T))
9int ?>?(T t1, T t2) {
10  return t2 < t1;
11}
12
13forall(dtype T | { void ^?{}(T *); })
14void delete(T * x) {
15  if (x) {
16    ^?{}(x);
17    free(x);
18  }
19}
Note: See TracBrowser for help on using the repository browser.