Changeset fd54fef for tests/exceptions


Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (4 years ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
dafbde8
Parents:
2f47ea4
Message:

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

Location:
tests/exceptions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/exceptions/defaults.cfa

    r2f47ea4 rfd54fef  
    5555
    5656void unhandled_test(void) {
    57         forall(dtype T, dtype V | is_exception(T, V))
     57        forall(T &, V & | is_exception(T, V))
    5858        void defaultTerminationHandler(T &) {
    5959                throw (unhandled_exception){};
  • TabularUnified tests/exceptions/polymorphic.cfa

    r2f47ea4 rfd54fef  
    33#include <exception.hfa>
    44
    5 FORALL_TRIVIAL_EXCEPTION(proxy, (otype T), (T));
    6 FORALL_TRIVIAL_INSTANCE(proxy, (otype U), (U))
     5FORALL_TRIVIAL_EXCEPTION(proxy, (T), (T));
     6FORALL_TRIVIAL_INSTANCE(proxy, (U), (U))
    77
    88const char * msg(proxy(int) * this) { return "proxy(int)"; }
     
    3333}
    3434
    35 FORALL_DATA_EXCEPTION(cell, (otype T), (T))(
     35FORALL_DATA_EXCEPTION(cell, (T), (T))(
    3636        T data;
    3737);
    3838
    39 FORALL_DATA_INSTANCE(cell, (otype T), (T))
     39FORALL_DATA_INSTANCE(cell, (T), (T))
    4040
    4141const char * msg(cell(int) * this) { return "cell(int)"; }
  • TabularUnified tests/exceptions/virtual-poly.cfa

    r2f47ea4 rfd54fef  
    1616};
    1717
    18 forall(otype T)
     18forall(T)
    1919struct mono_child_vtable {
    2020        mono_base_vtable const * const parent;
    2121};
    2222
    23 forall(otype T)
     23forall(T)
    2424struct mono_child {
    2525        mono_child_vtable(T) const * virtual_table;
     
    3737}
    3838
    39 forall(otype U)
     39forall(U)
    4040struct poly_base_vtable {
    4141        poly_base_vtable(U) const * const parent;
    4242};
    4343
    44 forall(otype U)
     44forall(U)
    4545struct poly_base {
    4646        poly_base_vtable(U) const * virtual_table;
    4747};
    4848
    49 forall(otype V)
     49forall(V)
    5050struct poly_child_vtable {
    5151        poly_base_vtable(V) const * const parent;
    5252};
    5353
    54 forall(otype V)
     54forall(V)
    5555struct poly_child {
    5656        poly_child_vtable(V) const * virtual_table;
Note: See TracChangeset for help on using the changeset viewer.