Changeset 3b4750d for tests/minmax.cfa


Ignore:
Timestamp:
Aug 15, 2020, 12:10:26 PM (15 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
505450a
Parents:
68d40b7
Message:

add negative test for signed integer min/max

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/minmax.cfa

    r68d40b7 r3b4750d  
    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.