Changeset 44aad8f for tests


Ignore:
Timestamp:
Apr 27, 2020, 4:36:58 PM (6 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, stuck-waitfor-destruct
Children:
c59a346
Parents:
038be32 (diff), c680a4b (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/manipulatorsOutput3.cfa

    r038be32 r44aad8f  
    11#include <fstream.hfa>
    22int main() {
    3     int128 x = 0xffff;
    4     x <<= 64;;
     3    int128 x = 0xffff, y = 0x2;
     4    x <<= 64;
    55    x += 0xffff;
     6    y <<= 64;
     7    y += 0123;
     8    y |= 0x8000000000000000;
    69    x = -x;
    710    sout | x;
     
    1922    sout | nl;
    2023
     24    printf( "%#.10o\n", 0123 );
     25    sout | wd( 1,10, oct(0123) );
    2126    sout | oct(x);
    2227    sout | nobase(oct(x));
    23     sout | wd( 45, upcase(oct(123)) );
    24     sout | wd( 45,40, upcase(oct(123)) );
    25     sout | wd( 40,45, upcase(oct(123)) );
    26     sout | wd( 45, upcase(oct(x)) );
    27     sout | wd( 45,40, upcase(oct(x)) );
    28     sout | wd( 40,45, upcase(oct(x)) );
    29     sout | left(wd( 45, upcase(oct(x)) )) | 'X';
    30     int128 y = 123456789;
    31     sout | left(wd( 45, 49, upcase(oct(y)) )) | 'X';
     28    sout | wd( 45, oct(0123) );
     29    sout | wd( 45,40, oct(0123) );
     30    sout | wd( 40,45, oct(0123) );
     31    sout | wd( 45, oct(x) );
     32    sout | wd( 45,40, oct(x) );
     33    sout | wd( 40,45, oct(x) );
     34
     35    sout | left(wd( 45, oct(0123) )) | 'X';
     36    sout | left(wd( 45, oct(x) )) | 'X';
     37    sout | left(wd( 45, oct(y) )) | 'X';
     38    sout | left(wd( 45,40, oct(0123) )) | 'X';
     39    sout | left(wd( 45,40, oct(x) )) | 'X';
     40    sout | left(wd( 45,40, oct(y) )) | 'X';
     41    sout | left(wd( 40,45, oct(0123) )) | 'X';
     42    sout | left(wd( 40,45, oct(x) )) | 'X';
     43    sout | left(wd( 40,45, oct(y) )) | 'X';
     44    printf( "%#-1.10oX\n", 0123 );
     45    sout | left(wd( 1,10, oct(0123) )) | 'X';
     46    printf( "%#-40.10oX\n", 0123 );
     47    sout | left(wd( 40,10, oct(0123) )) | 'X';
     48    sout | left(wd( 40,10, oct(x) )) | 'X';
     49    sout | left(wd( 40,10, oct(y) )) | 'X';
     50    sout | left(wd( 10,40, oct(0123) )) | 'X';
     51    sout | left(wd( 10,40, oct(x) )) | 'X';
     52    sout | left(wd( 10,40, oct(y) )) | 'X';
     53
     54    y = 123456789;
     55    sout | left(wd( 45, 49, oct(y) )) | 'X';
    3256    sout | nl;
    3357
Note: See TracChangeset for help on using the changeset viewer.