- Timestamp:
- Feb 8, 2020, 3:21:45 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8c9da33
- Parents:
- 0f5da65 (diff), 74330e7 (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. - Location:
- tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/expression.cfa
r0f5da65 r3ecfa13 1 1 struct S { int i; }; 2 void ?{}( S & s, int i ) { }2 void ?{}( S & s, int i ) { s.i = i; } 3 3 int ?`mary( int ); 4 4 int ?`mary( S ); … … 10 10 int a[3] = { 0, 0, 0 }; 11 11 S s = { 3 }, * ps = &s; 12 [int] t ;12 [int] t = { 3 }; 13 13 * [int] pt = &t; 14 int i = 3, j = 4;14 int i = 1, j = 2; 15 15 16 16 // operators 17 17 18 ! 18 !i; 19 19 ~i; 20 20 +i; … … 26 26 ps--; 27 27 28 i +j;29 i -j;30 i *j;28 i + j; 29 i - j; 30 i * j; 31 31 32 i /j;33 i %j;34 i ^j;35 i &j;36 i |j;37 i <j;38 i >j;39 i =j;32 i / j; 33 i % j; 34 i ^ j; 35 i & j; 36 i | j; 37 i < j; 38 i > j; 39 i = j; 40 40 41 i ==j;42 i !=j;43 i <<j;44 i >>j;45 i <=j;46 i >=j;47 i &&j;48 i ||j;41 i == j; 42 i != j; 43 i << j; 44 i >> j; 45 i <= j; 46 i >= j; 47 i && j; 48 i || j; 49 49 ps->i; 50 50 51 i *=j;52 i /=j;53 i %=j;54 i +=j;55 i -=j;56 i &=j;57 i |=j;58 i ^=j;59 i <<=j;60 i >>=j;51 i *= j; 52 i /= j; 53 i %= j; 54 i += j; 55 i -= j; 56 i &= j; 57 i |= j; 58 i ^= j; 59 i <<= j; 60 i >>= j; 61 61 62 i ?i:j;62 i ? i : j; 63 63 64 64 // postfix function call -
tests/labelledExit.cfa
r0f5da65 r3ecfa13 10 10 // Created On : Wed Aug 10 07:29:39 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Oct 25 17:41:51 201913 // Update Count : 712 // Last Modified On : Wed Feb 5 16:49:48 2020 13 // Update Count : 9 14 14 // 15 15 … … 162 162 163 163 // computed goto 164 //{165 //void *array[] = { &&foo, &&bar, &&hack };166 //foo: bar: hack:167 //&&foo;168 //&&bar;169 //goto *array[i];170 //}164 { 165 void *array[] = { &&foo, &&bar, &&hack }; 166 foo: bar: hack: 167 &&foo; 168 &&bar; 169 goto *array[i]; 170 } 171 171 172 172 Q: if ( i > 5 ) { -
tests/quotedKeyword.cfa
r0f5da65 r3ecfa13 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Feb 1 00:02:22202013 // Update Count : 2 412 // Last Modified On : Fri Feb 7 19:07:07 2020 13 // Update Count : 25 14 14 // 15 15 … … 17 17 18 18 struct { 19 int ``otype ``;20 int ``struct ``;19 int ``otype; 20 int ``struct; 21 21 } st = { 10, 10 }; 22 22 23 typedef int ``forall ``;24 ``forall ``xxx = 10;23 typedef int ``forall; 24 ``forall xxx = 10; 25 25 26 int ``_Alignas ``, ``_Alignof``, ``__alignof``, ``__alignof__``, ``asm``, ``__asm``, ``__asm__``, ``_At``, ``_Atomic``, ``__attribute``,27 ``__attribute__ ``, ``auto``, ``_Bool``, ``break``, ``case``, ``catch``, ``catchResume``, ``char``, ``choose``, ``_Complex``, ``__complex``,28 ``__complex__ ``, ``const``, ``__const``, ``__const__``, ``continue``, ``default``, ``disable``, ``do``, ``double``, ``dtype``, ``else``,29 ``enable ``, ``enum``, ``__extension__``, ``extern``, ``fallthru``, ``finally``, ``float``, ``__float128``, ``for``, ``forall``, ``fortran``,30 ``ftype ``, ``_Generic``, ``goto``, ``if``, ``_Imaginary``, ``__imag``, ``__imag__``, ``inline``, ``__inline``, ``__inline__``, ``int``,31 ``__int128 ``, ``__label__``, ``long``, ``lvalue``, ``_Noreturn``, ``__builtin_offsetof``, ``otype``, ``register``, ``restrict``,32 ``__restrict ``, ``__restrict__``, ``return``, ``short``, ``signed``, ``__signed``, ``__signed__``, ``sizeof``, ``static``,33 ``_Static_assert ``, ``struct``, ``switch``, ``_Thread_local``, ``throw``, ``throwResume``, ``trait``, ``try``, ``typedef``,34 ``typeof ``, ``__typeof``, ``__typeof__``, ``union``, ``unsigned``, ``__builtin_va_list``, ``void``, ``volatile``, ``__volatile``,35 ``__volatile__ ``, ``while``;26 int ``_Alignas, ``_Alignof, ``__alignof, ``__alignof__, ``asm, ``__asm, ``__asm__, ``_At, ``_Atomic, ``__attribute, 27 ``__attribute__, ``auto, ``_Bool, ``break, ``case, ``catch, ``catchResume, ``char, ``choose, ``_Complex, ``__complex, 28 ``__complex__, ``const, ``__const, ``__const__, ``continue, ``default, ``disable, ``do, ``double, ``dtype, ``else, 29 ``enable, ``enum, ``__extension__, ``extern, ``fallthru, ``finally, ``float, ``__float128, ``for, ``forall, ``fortran, 30 ``ftype, ``_Generic, ``goto, ``if, ``_Imaginary, ``__imag, ``__imag__, ``inline, ``__inline, ``__inline__, ``int, 31 ``__int128, ``__label__, ``long, ``lvalue, ``_Noreturn, ``__builtin_offsetof, ``otype, ``register, ``restrict, 32 ``__restrict, ``__restrict__, ``return, ``short, ``signed, ``__signed, ``__signed__, ``sizeof, ``static, 33 ``_Static_assert, ``struct, ``switch, ``_Thread_local, ``throw, ``throwResume, ``trait, ``try, ``typedef, 34 ``typeof, ``__typeof, ``__typeof__, ``union, ``unsigned, ``__builtin_va_list, ``void, ``volatile, ``__volatile, 35 ``__volatile__, ``while; 36 36 37 37 int main() { 38 int ``if ``= 0;39 ``catch ``= 1;40 st.``otype ``= 2;41 st.``struct ``= 3;42 ``throw ``= 4;43 sout | ``catch `` + st.``otype`` + st.``struct`` + ``throw``;38 int ``if = 0; 39 ``catch = 1; 40 st.``otype = 2; 41 st.``struct = 3; 42 ``throw = 4; 43 sout | ``catch + st.``otype + st.``struct + ``throw; 44 44 } 45 45
Note: See TracChangeset
for help on using the changeset viewer.