Changeset 794db28 for tests


Ignore:
Timestamp:
Aug 18, 2020, 11:35:50 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
93526ef
Parents:
d2b5d2d (diff), 36de20d (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 added
7 edited

Legend:

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

    rd2b5d2d r794db28  
    11char                    z a     min a
    2 signed int              4 3     min 3
     2signed int              4 -3    min -3
    33unsigned int            4 3     min 3
    4 signed long int         4 3     min 3
     4signed long int         4 -3    min -3
    55unsigned long int       4 3     min 3
    6 signed long long int    4 3     min 3
     6signed long long int    4 -3    min -3
    77unsigned long long int  4 3     min 3
    88float                   4. 3.1  min 3.1
     
    1111
    1212char                    z a     max z
    13 signed int              4 3     max 4
     13signed int              4 -3    max 4
    1414unsigned int            4 3     max 4
    15 signed long int         4 3     max 4
     15signed long int         4 -3    max 4
    1616unsigned long int       4 3     max 4
    17 signed long long int    4 3     max 4
     17signed long long int    4 -3    max 4
    1818unsigned long long int  4 3     max 4
    1919float                   4. 3.1  max 4.
  • tests/Makefile.am

    rd2b5d2d r794db28  
    163163        $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
    164164
     165# Exception Tests
     166# Test with libcfathread; it changes how storage works.
     167
     168exceptions/%-threads : exceptions/%.cfa $(CFACCBIN)
     169        $(CFACOMPILETEST) -include exceptions/with-threads.hfa -c -o $(abspath ${@}).o
     170        $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
     171
    165172#------------------------------------------------------------------------------
    166173# Other targets
  • tests/alloc.cfa

    rd2b5d2d r794db28  
    1010// Created On       : Wed Feb  3 07:56:22 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Apr  6 21:08:23 2020
    13 // Update Count     : 428
     12// Last Modified On : Fri Aug 14 16:59:59 2020
     13// Update Count     : 430
    1414//
    1515
     
    9090        // do not free
    9191
    92         ip1 = alloc_set( 2 * dim, ip );                                         // CFA array alloc, fill
     92        ip1 = alloc_set( 2 * dim, ip, 2 * dim );                                // CFA array alloc, fill
    9393        printf( "CFA array alloc, fill from array\n" );
    9494        for ( i; 2 * dim ) { printf( "%#x %#x, ", ip[i], ip1[i] ); }
     
    288288        // do not free
    289289
    290         stp1 = alloc_align_set( Alignment, dim, stp );          // CFA array memalign, fill
     290        stp1 = alloc_align_set( Alignment, dim, stp, dim );     // CFA array memalign, fill
    291291        assert( (uintptr_t)stp % Alignment == 0 );
    292292        printf( "CFA array alloc_align, fill array\n" );
  • tests/exceptions/terminate.cfa

    rd2b5d2d r794db28  
    142142        }
    143143}
    144 
  • tests/heap.cfa

    rd2b5d2d r794db28  
    1010// Created On       : Tue Nov  6 17:54:56 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug  4 06:36:17 2020
    13 // Update Count     : 56
     12// Last Modified On : Sun Aug  9 08:05:16 2020
     13// Update Count     : 57
    1414//
    1515
     
    232232                size_t s = i + default_mmap_start();                    // cross over point
    233233                char * area = (char *)calloc( 1, s );
    234 //              if ( area == 0p ) abort( "calloc/realloc/free out of memory" );
    235234                if ( area[0] != '\0' || area[s - 1] != '\0' ||
    236235                         area[malloc_size( area ) - 1] != '\0' ||
    237                          ! malloc_zero_fill( area ) ) //abort( "calloc/realloc/free corrupt storage3" );
    238                         printf( "C %zd %d %d %d %d\n", s, area[0] != '\0', area[s - 1] != '\0', area[malloc_size( area ) - 1] != '\0', ! malloc_zero_fill( area ) );
     236                         ! malloc_zero_fill( area ) ) abort( "calloc/realloc/free corrupt storage3" );
    239237
    240238                // Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
    241239                for ( r; i ~ 256 * 1024 ~ 26 ) {                                // start at initial memory request
    242240                        area = (char *)realloc( area, r );                      // attempt to reuse storage
    243 //                      if ( area == 0p ) abort( "calloc/realloc/free out of memory" );
    244241                        if ( area[0] != '\0' || area[r - 1] != '\0' ||
    245242                                 area[malloc_size( area ) - 1] != '\0' ||
     
    255252                // initial N byte allocation
    256253                char * area = (char *)memalign( a, amount );    // aligned N-byte allocation
    257 //              if ( area == 0p ) abort( "memalign/realloc/free out of memory" ); // no storage ?
    258254                //sout | alignments[a] | area;
    259255                if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
  • tests/linking/withthreads.cfa

    rd2b5d2d r794db28  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // nothreads.cfa --
     7// withthreads.cfa --
    88//
    99// Author           : Thierry Delisle
  • tests/minmax.cfa

    rd2b5d2d r794db28  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  4 21:45:31 2018
    13 // Update Count     : 52
     12// Last Modified On : Sat Aug 15 08:28:01 2020
     13// Update Count     : 54
    1414//
    1515
     
    2323
    2424        sout | "char\t\t\t"                                     | 'z' | ' ' | 'a' | "\tmin " | min( 'z', 'a' );
    25         sout | "signed int\t\t"                         | 4 | 3 | "\tmin" | min( 4, 3 );
     25        sout | "signed int\t\t"                         | 4 | -3 | "\tmin" | min( 4, -3 );
    2626        sout | "unsigned int\t\t"                       | 4u | 3u | "\tmin" | min( 4u, 3u );
    27         sout | "signed long int\t\t"            | 4l | 3l | "\tmin" | min( 4l, 3l );
     27        sout | "signed long int\t\t"            | 4l | -3l | "\tmin" | min( 4l, -3l );
    2828        sout | "unsigned long int\t"            | 4ul | 3ul | "\tmin" | min( 4ul, 3ul );
    29         sout | "signed long long int\t"         | 4ll | 3ll | "\tmin" | min( 4ll, 3ll );
     29        sout | "signed long long int\t"         | 4ll | -3ll | "\tmin" | min( 4ll, -3ll );
    3030        sout | "unsigned long long int\t"       | 4ull | 3ull | "\tmin" | min( 4ull, 3ull );
    3131        sout | "float\t\t\t"                            | 4.0f | 3.1f | "\tmin" | min( 4.0f, 3.1f );
     
    3636
    3737        sout | "char\t\t\t"                                     | 'z' | ' ' | 'a' | "\tmax " | max( 'z', 'a' );
    38         sout | "signed int\t\t"                         | 4 | 3 | "\tmax" | max( 4, 3 );
     38        sout | "signed int\t\t"                         | 4 | -3 | "\tmax" | max( 4, -3 );
    3939        sout | "unsigned int\t\t"                       | 4u | 3u | "\tmax" | max( 4u, 3u );
    40         sout | "signed long int\t\t"            | 4l | 3l | "\tmax" | max( 4l, 3l );
     40        sout | "signed long int\t\t"            | 4l | -3l | "\tmax" | max( 4l, -3l );
    4141        sout | "unsigned long int\t"            | 4ul | 3ul | "\tmax" | max( 4ul, 3ul );
    42         sout | "signed long long int\t"         | 4ll | 3ll | "\tmax" | max( 4ll, 3ll );
     42        sout | "signed long long int\t"         | 4ll | -3ll | "\tmax" | max( 4ll, -3ll );
    4343        sout | "unsigned long long int\t"       | 4ull | 3ull | "\tmax" | max( 4ull, 3ull );
    4444        sout | "float\t\t\t"                            | 4.0f | 3.1f | "\tmax" | max( 4.0f, 3.1f );
Note: See TracChangeset for help on using the changeset viewer.