Changeset 8e4aa05 for tests/smart-pointers.cfa
- Timestamp:
- Mar 4, 2021, 7:40:25 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 77d601f
- Parents:
- 342af53 (diff), a5040fe (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/smart-pointers.cfa
r342af53 r8e4aa05 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.