Changeset c715e5f for tests


Ignore:
Timestamp:
May 25, 2022, 5:51:24 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
c3b9d639
Parents:
5024df4
Message:

Removed most of the exception macros (EHM_ group). Made changes to the exception declaration pass to do so.

Location:
tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/quasiKeyword.txt

    r5024df4 rc715e5f  
    1 quasiKeyword.cfa:54:25: warning: Compiled
     1quasiKeyword.cfa:52:25: warning: Compiled
  • tests/exceptions/defaults.cfa

    r5024df4 rc715e5f  
    22
    33#include <string.h>
    4 #include <exception.hfa>
    54
    65exception log_message {
     
    87};
    98
    10 _EHM_DEFINE_COPY(log_message, )
     9void copy(log_message * this, log_message * that) {
     10        *this = *that;
     11}
     12
    1113const char * msg(log_message * this) {
    1214        return this->msg;
    1315}
    14 _EHM_VIRTUAL_TABLE(log_message, , log_vt);
     16
     17const struct log_message_vtable log_vt @= {
     18        .__cfavir_typeid : &__cfatid_log_message,
     19        .size : sizeof(struct log_message),
     20        .copy : copy,
     21        .^?{} : ^?{},
     22        .msg : msg,
     23};
    1524
    1625// Logging messages don't have to be handled.
  • tests/linking/exception-nothreads.cfa

    r5024df4 rc715e5f  
    1515
    1616#include <stdlib.hfa>
    17 #include <exception.hfa>
    1817
    19 EHM_EXCEPTION(ping)();
    20 EHM_VIRTUAL_TABLE(ping, ping_vt);
     18exception ping {};
     19vtable(ping) ping_vt;
    2120
    2221int main(void) {
  • tests/linking/exception-withthreads.cfa

    r5024df4 rc715e5f  
    1515
    1616#include <stdlib.hfa>
    17 #include <exception.hfa>
    1817#include "../exceptions/with-threads.hfa"
    1918
    20 EHM_EXCEPTION(ping)();
    21 EHM_VIRTUAL_TABLE(ping, ping_vt);
     19exception ping {};
     20vtable(ping) ping_vt;
    2221
    2322int main(void) {
  • tests/quasiKeyword.cfa

    r5024df4 rc715e5f  
    44// quasiKeyword.cfa -- test that quasi-keywords can be used for variable and functions names, as well as keywords in
    55//                                         control structures.
    6 // 
     6//
    77// Author           : Peter A. Buhr
    88// Created On       : Wed Feb 17 10:33:49 2021
     
    1010// Last Modified On : Sat Jun  5 10:07:59 2021
    1111// Update Count     : 8
    12 // 
     12//
    1313
    14 #include <exception.hfa>
    15 
    16 EHM_EXCEPTION( E )();
     14exception E {};
    1715
    1816void catch( int i ) {}
     
    4947                } fixup ( E * ) {
    5048                } finally {
    51                 } 
     49                }
    5250        else catch = 3;
    5351
Note: See TracChangeset for help on using the changeset viewer.