Changeset 7799f79 for tests/vector/vec2_int.cfa
 Timestamp:
 Dec 13, 2019, 7:41:58 PM (3 years ago)
 Branches:
 armeh, enum, forallpointerdecay, jacob/cs343translation, master, newastuniqueexpr, pthreademulation, qualifiedEnum
 Children:
 ae09808
 Parents:
 ae3db00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

tests/vector/vec2_int.cfa
rae3db00 r7799f79 48 48 sout  "?*=?:"  v1; 49 49 50 { 51 vec2(int) u = {1, 5}; 52 vec2(int) v = {2, 3}; 53 sout  "?*?(vec)"  (u * v); 54 sout  "?*=?(vec)"  (u *= v); 55 } 56 50 57 v1 = (vec2(int)){21, 10}; 51 58 sout  "?/?:"  (v1 / 3); … … 53 60 v1 /= 3; 54 61 sout  "?/=?:"  v1; 62 63 { 64 vec2(int) u = {11, 5}; 65 vec2(int) v = {2, 3}; 66 sout  "?/?(vec)"  (u / v); 67 sout  "?/=?(vec)"  (u /= v); 68 } 69 70 { 71 vec2(int) u = {1, 3}; 72 sout  "++?"  ++u; 73 } 74 { 75 vec2(int) u = {1, 3}; 76 sout  "?"  ++u; 77 } 78 { 79 vec2(int) u = {1, 3}; 80 sout  "?++(part 1)"  u++; 81 sout  "?++(part 2)"  u; 82 } 83 { 84 vec2(int) u = {1, 3}; 85 sout  "?(part 1)"  u; 86 sout  "?(part 2)"  u; 87 } 88 89 // % 90 { 91 vec2(int) u = {12, 123}; 92 sout  "?%?(int)"  (u % 2); 93 sout  "?%=?(int)"  (u %= 2); 94 } 95 { 96 vec2(int) u = {12, 27}; 97 vec2(int) v = {5, 4}; 98 sout  "?%?(vec)"  (u % v); 99 sout  "?%=?(vec)"  (u %= v); 100 } 101 102 103 // & 104 { 105 vec2(int) u = {5, 8}; 106 sout  "?&?(int)"  (u & (1 << 3)); 107 sout  "?&=?(int)"  (u &= (1 << 3)); 108 } 109 { 110 vec2(int) u = {5, 6}; 111 vec2(int) v = {3, 7}; 112 sout  "?&?(vec)"  (u & v); 113 sout  "?&=?(vec)"  (u &= v); 114 } 115 116 //  117 { 118 vec2(int) u = {5, 1}; 119 sout  "??(int)"  (u  2); 120 sout  "?=?(int)"  (u = 2); 121 } 122 { 123 vec2(int) u = {5, 1}; 124 vec2(int) v = {2, 1}; 125 sout  "??(vec)"  (u  v); 126 sout  "?=?(vec)"  (u = v); 127 } 128 129 // ^ 130 { 131 vec2(int) u = {9, 5}; 132 sout  "?^?(int)"  (u ^ 5); 133 sout  "?^=?(int)"  (u ^= 5); 134 } 135 { 136 vec2(int) u = {9, 5}; 137 vec2(int) v = {5, 0}; 138 sout  "?^?(vec)"  (u ^ v); 139 sout  "?^=?(vec)"  (u ^= v); 140 } 141 142 // << 143 { 144 vec2(int) u = {2, 1}; 145 sout  "?<<?(int)"  (u << 1); 146 sout  "?<<=?(int)"  (u <<= 1); 147 } 148 { 149 vec2(int) u = {1, 1}; 150 vec2(int) v = {5, 2}; 151 sout  "?<<?(vec)"  (u << v); 152 sout  "?<<=?(vec)"  (u <<= v); 153 } 154 155 // ~ 156 { 157 vec2(int) u = {5, 2}; 158 sout  "~?"  (~u); 159 } 55 160 56 161 v1 = (vec2(int)){2, 3};
Note: See TracChangeset
for help on using the changeset viewer.