Ignore:
Timestamp:
Aug 18, 2021, 2:04:55 PM (11 months ago)
Author:
Henry Xue <y58xue@…>
Branches:
enum, forall-pointer-decay, jacob/cs343-translation, master
Children:
fe8aa21
Parents:
6d63c14
Message:

Update exception tests to use new syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/polymorphic.cfa

    r6d63c14 rd00d581  
    11// Testing polymophic exception types.
    22
    3 #include <exception.hfa>
     3forall(T &) exception proxy {};
    44
    5 EHM_FORALL_EXCEPTION(proxy, (T&), (T))();
    6 
    7 EHM_FORALL_VIRTUAL_TABLE(proxy, (int), proxy_int);
    8 EHM_FORALL_VIRTUAL_TABLE(proxy, (char), proxy_char);
     5vtable(proxy(int)) proxy_int;
     6vtable(proxy(char)) proxy_char;
    97
    108void proxy_test(void) {
     
    3331}
    3432
    35 EHM_FORALL_EXCEPTION(cell, (T), (T))(
     33forall(T) exception cell {
    3634        T data;
    37 );
     35};
    3836
    39 EHM_FORALL_VIRTUAL_TABLE(cell, (int), int_cell);
    40 EHM_FORALL_VIRTUAL_TABLE(cell, (char), char_cell);
    41 EHM_FORALL_VIRTUAL_TABLE(cell, (bool), bool_cell);
     37vtable(cell(int)) int_cell;
     38vtable(cell(char)) char_cell;
     39vtable(cell(bool)) bool_cell;
    4240
    4341void cell_test(void) {
Note: See TracChangeset for help on using the changeset viewer.