source: src/examples/wrapper/src/main.c @ 21995bc

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 21995bc was 21995bc, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

added test for copies and assignment

  • Property mode set to 100644
File size: 307 bytes
Line 
1#include "pointer.h"
2
3wrapper_t make_copy(wrapper_t copy)
4{
5        return copy;
6}
7
8int main(int argc, char const *argv[])
9{
10        wrapper_t p = wrap(6);
11
12        sout | endl | "test started" | endl;
13
14        wrapper_t p2 = p;
15
16        clear(&p);
17
18        p = p2;
19
20        wrapper_t p3 = make_copy(p2);
21
22        sout | endl | "test ended" | endl;
23
24        return 0;
25}
Note: See TracBrowser for help on using the repository browser.