- Timestamp:
- Feb 1, 2021, 4:23:55 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 85871478
- Parents:
- f99f5ba
- Location:
- tests
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/smart-pointers.cfa
rf99f5ba r8be729f 2 2 3 3 #include <memory.hfa> 4 #include < stdlib.hfa>4 #include <assert.h> 5 5 6 6 void counter_test(void) { … … 53 53 } 54 54 55 void 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 55 67 int main(int argc, char * argv[]) { 56 68 counter_test(); 57 69 unique_test(); 58 70 pointer_equality(); 71 72 printf("done\n"); 59 73 }
Note: See TracChangeset
for help on using the changeset viewer.