source: tests/io/manipulatorsOutput2.cfa @ 93c86ac

Last change on this file since 93c86ac was 0effb6a, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

update tests and expected output for manipulator tests

  • Property mode set to 100644
File size: 2.5 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2019 University of Waterloo
3//
4// manipulatorsOutput2.cfa --
5//
6// Author           : Peter A. Buhr
7// Created On       : Sat Jun  8 18:04:11 2019
8// Last Modified By : Peter A. Buhr
9// Last Modified On : Sat Apr 10 09:16:09 2021
10// Update Count     : 11
11//
12
13#include <fstream.hfa>
14
15int main() {
16        sout | nl;
17    sout | bin(0) | bin(27HH) | bin(27H) | bin(27) | bin(27L);
18    sout | bin(-27HH) | bin(-27H) | bin(-27) | bin(-27L);
19    sout | oct(0) | oct(27HH) | oct(27H) | oct(27) | oct(27L);
20    sout | oct(-27HH) | oct(-27H) | oct(-27) | oct(-27L);
21    sout | hex(0) | hex(27HH) | hex(27H) | hex(27) | hex(27L);
22    sout | hex(-27HH) | hex(-27H) | hex(-27) | hex(-27L);
23    sout | hex(0.0) | hex(27.5F) | hex(27.5) | hex(27.5L);
24    sout | hex(-27.5F) | hex(-27.5) | hex(-27.5L);
25        sout | sci(0.0) | sci(27.5) | sci(-27.5);
26        sout | eng(0.0) | eng(27.5) | eng(-27.5);
27        sout | upcase(bin(27)) | upcase(hex(27)) | upcase(27.5e-10) | upcase(hex(27.5));
28        sout | nobase(bin(27)) | nobase(oct(27)) | nobase(hex(27));
29    sout | 0. | nodp(0.) | 27.0 | nodp(27.0) | nodp(27.5);
30    sout | sign(27) | sign(-27) | sign(27.) | sign(-27.) | sign(27.5) | sign(-27.5);
31        sout | wd( 4, 34) | wd( 3, 34 ) | wd( 2, 34 );
32        sout | wd( 10, 4.) | wd( 9, 4. ) | wd( 8, 4. );
33        sout | wd( 4, "ab" ) | wd( 3, "ab" ) | wd( 2, "ab" );
34        sout | wd( 4, 34567 ) | wd( 3, 34567 ) | wd( 2, 34567 );
35        sout | wd( 4, 3456. ) | wd( 3, 3456. ) | wd( 2, 3456. );
36        sout | wd( 4, "abcde" ) | wd( 3, "abcde" ) | wd( 2,"abcde" );
37        sout | wd(4,3, 34) | wd(8,4, 34) | wd(10,10, 34);
38        sout | wd( 4,1, 3456 ) | wd( 8,2, 3456 ) | wd( 10,3, 3456 );
39        sout | wd( 4,0, 0 ) | wd( 3,10, 34 );
40        sout | wd(6,3, 27.5) | wd(8,1, 27.5) | wd(8,0, 27.5) | wd(3,8, 27.5);
41        sout | wd(6,3, 27.0) | wd(6,3, 27.5) | wd(8,1, 27.5) | wd(8,0, 27.5) | wd(3,8, 27.5);
42        sout | left(wd(4,27)) | left(wd(10,27.)) | left(wd(10,27.5)) | left(wd(4,3,27)) | left(wd(10,3,27.5));
43        sout | ws(6,6, 234.567) | ws(6,5, 234.567) | ws(6,4, 234.567) | ws(6,3, 234.567);
44        sout | ws(6,6, 234567.) | ws(6,5, 234567.) | ws(6,4, 234567.) | ws(6,3, 234567.);
45        sout | ws(3,6, 234567.) | ws(4,6, 234567.) | ws(5,6, 234567.) | ws(6,6, 234567.);
46        sout | wd(6, "abcd") | wd(8, "abcd") | wd(2, "abcd");
47        sout | wd(6,8, "abcd") | wd(6,8, "abcdefghijk") | wd(6,3, "abcd");
48    sout | pad0(wd(4,27)) | pad0(wd(4,3,27)) | pad0(wd(8,3,27.5));
49
50//      sexit | 3 | 4;
51}
52
53// Local Variables: //
54// tab-width: 4 //
55// compile-command: "cfa -Wall -Wextra manipulatorsOutput2.cfa" //
56// End: //
Note: See TracBrowser for help on using the repository browser.