Ignore:
Timestamp:
May 18, 2016, 11:42:10 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
6e3ae00
Parents:
bf1ee05
Message:

added test for copies and assignment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/wrapper/src/main.c

    rbf1ee05 r21995bc  
    11#include "pointer.h"
     2
     3wrapper_t make_copy(wrapper_t copy)
     4{
     5        return copy;
     6}
    27
    38int main(int argc, char const *argv[])
    49{
    510        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
    624        return 0;
    725}
Note: See TracChangeset for help on using the changeset viewer.