Ignore:
Timestamp:
Feb 2, 2021, 9:56:41 PM (9 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
3d67f83
Parents:
144fa5c (diff), 1c1c180 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/smart-pointers.cfa

    r144fa5c r3b402339  
    22
    33#include <memory.hfa>
    4 #include <stdlib.hfa>
     4#include <assert.h>
    55
    66void counter_test(void) {
     
    5353}
    5454
     55void declare_test(void) {
     56        counter_ptr(int) ptr_i0 = 3;
     57        counter_ptr(char) ptr_c0 = 'a';
     58        counter_ptr(float) ptr_f0 = 3.5f;
     59        counter_ptr(double) ptr_d0 = 3.5;
     60
     61        unique_ptr(int) ptr_i1 = 3;
     62        unique_ptr(char) ptr_c1 = 'a';
     63        unique_ptr(float) ptr_f1 = 3.5f;
     64        unique_ptr(double) ptr_d1 = 3.5;
     65}
     66
    5567int main(int argc, char * argv[]) {
    5668        counter_test();
    5769        unique_test();
    5870        pointer_equality();
     71
     72        printf("done\n");
    5973}
Note: See TracChangeset for help on using the changeset viewer.