Changeset 6d43cdde


Ignore:
Timestamp:
Apr 2, 2020, 11:35:13 AM (18 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
3eb5a478
Parents:
cfbc703
Message:

Rework of exception tests. Includes a new disabled failing test case.

Location:
tests/exceptions
Files:
11 added
8 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/except-mac.hfa

    rcfbc703 r6d43cdde  
    66#define GLUE3(left, middle, right) left##middle##right
    77
    8 // The fully (perhaps overly) qualified name of the base exception type:
     8// The fully qualified name of the base exception type:
    99#define BASE_EXCEPT __cfaehm_base_exception_t
    1010
     
    3434        __VA_ARGS__ \
    3535}; \
    36 extern TABLE(except_name) INSTANCE(except_name);
     36extern TABLE(except_name) INSTANCE(except_name)
    3737
    3838// The first field of the exception structure should be created with this.
     
    5050        &INSTANCE(parent_name), sizeof(except_name), \
    5151        copy, free, msg, ## __VA_ARGS__ \
    52 };
     52}
    5353
    5454// Same, but used declarators for arguments.
     
    5757        .parent : &INSTANCE(parent_name), .size : sizeof(except_name), \
    5858        .copy : copy, .free : free, .msg : msg, ## __VA_ARGS__ \
    59 };
     59}
    6060
    6161
    6262
    6363// Declare a trivial exception, one that adds no features:
    64 #define TRIVIAL_EXCEPTION(name) \
    65 DECLARE_EXCEPT(name,BASE_EXCEPT,) \
     64#define _TRIVIAL_EXCEPTION(name, parent_name, ...) \
     65DECLARE_EXCEPT(name,parent_name,); \
    6666struct name { \
    6767        VTABLE_FIELD(name); \
     
    7676        VTABLE_INIT(this,name); \
    7777} \
    78 VTABLE_INSTANCE(name,BASE_EXCEPT,GLUE2(name,_copy),^?{},GLUE2(name,_msg),)
     78VTABLE_INSTANCE(name,parent_name,GLUE2(name,_copy),^?{},GLUE2(name,_msg),)
     79
     80// TRIVIAL_EXCEPTION(name_of_exception, [parent_exception])
     81#define TRIVIAL_EXCEPTION(...) _TRIVIAL_EXCEPTION(__VA_ARGS__,BASE_EXCEPT,)
Note: See TracChangeset for help on using the changeset viewer.