Changeset 8da7421f for tests


Ignore:
Timestamp:
Oct 20, 2020, 12:35:25 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
3aec25f
Parents:
5afb49a (diff), d5631b3 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/const-init.txt

    r5afb49a r8da7421f  
    1 done
     1almost done
     2dtor
  • tests/complex.cfa

    r5afb49a r8da7421f  
    1414//
    1515
    16 #include <stdio.h>
    1716#include <complex.h>
    1817#ifdef __CFA__
  • tests/const-init.cfa

    r5afb49a r8da7421f  
    1616/*
    1717
    18 This test shows non-crashing of generated code for constants with interesting initizers.
     18These tests show non-crashing of generated code for constants with interesting initializers.
    1919The potential for these to crash is compiler dependent.
    2020
    2121There are two cases:
    22 1. static constants in one compilation unit (tested here)
     221. static constants in one compilation unit (tested here, in a few sub-cases)
    23232. extern constants across compilation units (tested by libcfa being loadable, specifically
    24    the constant declarations in libcfa/src/limits.cfa, which almost every test exercises,
     24   the constant definitions in libcfa/src/limits.cfa, which almost every test exercises,
    2525   including "hello;" but notably, the "limits" test does not exercise it because that test
    2626   is compile-only)
     
    3737GCC-10 on Ubuntu 20.04    Has crashed      Has crashed
    3838
    39 For this test case to fail, with most other tests passing, would be a situation only ever
     39For this test to fail, with most other tests passing, would be a situation only ever
    4040observed with GCC-8.
    4141
    4242*/
    4343
     44// initailized by generated function, called before main
    4445static const char foo = -1;
    4546
     47struct thing{};
     48void ^?{}( thing & ) { printf("dtor\n"); }
     49
    4650int main() {
    47     printf("done\n");
     51    // foo is already initialized
     52
     53    // no dtor => stays a (static) local, initialized here
     54    static const char bar = -1;
     55
     56    // has dtor => becomes a global, ctor called here, dtor called at exit
     57    static const thing it;
     58
     59    printf("almost done\n");
    4860}
  • tests/exceptions/cancel/coroutine.cfa

    r5afb49a r8da7421f  
    11// Try cancelling a coroutine.
    22
    3 #include <stdio.h>
    43#include <coroutine.hfa>
    54#include <exception.hfa>
  • tests/exceptions/conditional.cfa

    r5afb49a r8da7421f  
    55
    66#include <exception.hfa>
    7 #include <stdio.h>
    87
    98VTABLE_DECLARATION(num_error)(
  • tests/exceptions/except-io.hfa

    r5afb49a r8da7421f  
    11// Common tools for the exception tests.
    2 
    3 #include <stdio.h>
    42
    53// Echo when a destructor is run and an area/block is left.
  • tests/exceptions/trash.cfa

    r5afb49a r8da7421f  
    22
    33#include <exception.hfa>
    4 #include <stdio.h>
    54
    65TRIVIAL_EXCEPTION(yin);
  • tests/global-monomorph.cfa

    r5afb49a r8da7421f  
    1 // Crea
    2 
    3 #include <stdlib.hfa>
    4 #include <stdio.h>
     1// Create monomorphic instances of polymorphic types at global scope.
    52
    63forall(dtype T)
  • tests/poly-d-cycle.cfa

    r5afb49a r8da7421f  
    11// Check that a cycle of polymorphic dtype structures can be instancated.
    2 
    3 #include <stdio.h>
    42
    53forall(dtype T)
  • tests/poly-o-cycle.cfa

    r5afb49a r8da7421f  
    11// Check that a cycle of polymorphic otype structures can be instancated.
    2 
    3 #include <stdio.h>
    42
    53forall(otype T)
Note: See TracChangeset for help on using the changeset viewer.