- Timestamp:
- Aug 6, 2018, 4:33:35 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 524ed86
- Parents:
- 73abe95
- Location:
- tests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/fstream_test.txt
r73abe95 r58b6d1b 2 2 Vous avez entré -2 3 3 le nombre -2 est négatif 4 Entrez trois nombres, s'il vous plaît: 4 Entrez trois nombres, s'il vous plaît: 5 5 Vous avez entré i:2 j:3 k:4 -
tests/.expect/io1.txt
r73abe95 r58b6d1b 8 8 9 9 closing delimiters 10 1, x 2. x 3; x 4! x 5? x 6% x 7 ¢ x 8» x 9) x 10] x 11} x10 1, x 2. x 3; x 4! x 5? x 6% x 7 ¢ x 8 » x 9) x 10] x 11} x 11 11 12 12 opening/closing delimiters -
tests/Makefile.in
r73abe95 r58b6d1b 307 307 fstream_test_SOURCES = fstream_test.c 308 308 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 309 310 # SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated311 # however, here it is more complicated because it must match the dependencies based on how312 # they are generated by gcc313 headers = $(shell find $(top_srcdir)/libcfa/src -type f ! -name "*.*")314 headers_real = $(shell realpath --relative-to=$(top_srcdir)/libcfa/src $(headers))315 headers_deps = $(addprefix %/, $(headers_real))316 309 all: all-am 317 310 … … 618 611 .INTERMEDIATE: .validate .validate.c 619 612 613 #---------------------------------------------------------------------------------------------------------------- 620 614 all-local : 621 615 @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test} … … 638 632 concurrency : 639 633 @+${TEST_PY} --debug=${debug} -Iconcurrent 640 $(headers_deps) : 641 echo "Dummy rule, should never be called" 642 643 # %/stdlib: 644 # echo "Dummy rule, should never be called" 645 634 635 #---------------------------------------------------------------------------------------------------------------- 646 636 # implicit rule so not all test require a rule 647 637 % : %.c $(CC) -
tests/coroutine/.expect/fmtLines.txt
r73abe95 r58b6d1b 1 // / / Cf oral l Ve rsio 2 n 1. 0.0 Copy righ t (C 3 ) 20 17 U nive rsit y of 4 Wat erlo o/// / Th e co 5 nten ts o f th is f ile 6 are cove red unde r th 7 e li cenc e ag reem ent 8 in t he// fil e "L ICEN 9 CE" dist ribu ted with 10 Cfo rall .// // f mtLi 11 nes. cc - - // // Auth 12 or : P eter 13 A. Buhr // C reat ed O 14 n : Su n Se p 17 15 21: 56:1 5 20 17// Las 16 t Mo difi ed B y : Pete 17 r A. Buh r// Last Mod 18 ifie d On : M on S ep 1 19 8 11 :35: 57 2 017/ / Up 20 date Cou nt : 31/ 21 / #i nclu de < fstr eam> 22 #inc lude <co rout ine> 23 coro utin e Fo rmat { c 24 har ch; // 25 use d fo r co mmun icat 26 ion int g, b ; 27 // g loba l be caus 28 e us ed i n de stru ctor 29 };vo id ? {}( Form at & 30 fmt ) { resu me( 31 fmt ); // s 32 tart cor outi ne}v oid 33 ^?{} ( Fo rmat & f mt ) 34 { if ( f mt.g != 35 0 || fmt .b ! = 0 ) so 36 ut | end l;}v oid main 37 ( Fo rmat & f mt ) { f 38 or ( ;; ) { 39 // for as m any char 40 acte rs for ( fm t.g 41 = 0; fmt .g < 5; fmt. 42 g += 1 ) { // g roup 43 s of 5 b lock s for 44 ( fm t.b = 0; fmt .b < 45 4; fmt. b += 1 ) { / 46 / bl ocks of 4 ch arac 47 ters for ( ;; ) { 48 / / fo r ne wlin 49 e ch arac ters sus 50 pend (); if ( fmt 51 .ch != ' \n' ) br eak; 52 // ign ore newl ine 53 } // for s out 54 | fm t.ch ; // p 55 rint cha ract er } / 56 / fo r sout | " "; 57 // p rint blo 58 ck s epar ator } // f 59 or sout | e ndl; 60 // prin t gr oup 61 sepa rato r } // f or} 62 // m ainv oid prt( For 63 mat & fm t, c har ch ) 64 { fm t.ch = c h; 65 re sume ( fm t ); } // 66 prt int main () { For 67 mat fmt; cha r ch ; fo 68 r ( ;; ) { sin | ch 69 ; / / re ad o 70 ne c hara cter i f ( 71 eof( sin ) ) bre ak; 72 // eof ? prt( 73 fmt , ch ); } // for 74 } // mai n// Loca l Va 75 riab les: /// / ta b-wi 76 dth: 4 / /// comp ile- 77 comm and: "cf a fm tLin 78 es.c " // // E nd: // 1 //// Cfo rall Ver sion 2 1.0 .0 C opyr ight (C) 3 201 7 Un iver sity of 4 Wate rloo //// The con 5 tent s of thi s fi le a 6 re c over ed u nder the 7 lic ence agr eeme nt i 8 n th e// file "LI CENC 9 E" d istr ibut ed w ith 10 Cfor all. //// fmt Line 11 s.cc --/ /// Auth or 12 : P eter A. 13 Buhr // C reat ed O n 14 : Su n Se p 17 21: 15 56:1 5 20 17// Las t Mo 16 difi ed B y : Pete r A. 17 Buh r// Last Mod ifie 18 d On : M on S ep 1 8 11 19 :35: 57 2 017/ / Up date 20 Cou nt : 31/ /#in 21 clud e <f stre am.h fa># 22 incl ude <cor outi ne.h 23 fa>c orou tine For mat 24 { ch ar c h; 25 // used for com muni 26 cati on i nt g , b; 27 / / gl obal bec 28 ause use d in des truc 29 tor} ;voi d ?{ }( F orma 30 t & fmt ) { r esum 31 e( f mt ) ; / 32 / st art coro utin e}vo 33 id ^ ?{}( For mat & fm 34 t ) { if ( fm t.g 35 != 0 || fmt. b != 0 ) 36 sou t | endl ;}vo id m 37 ain( For mat & fm t ) 38 { fo r ( ;; ) { 39 // f or a s ma ny c 40 hara cter s f or ( fmt 41 .g = 0; fmt. g < 5; f 42 mt.g += 1 ) { / / gr 43 oups of 5 bl ocks f 44 or ( fmt .b = 0; fmt. 45 b < 4; f mt.b += 1 ) 46 { // blo cks of 4 cha 47 ract ers f or ( ;; 48 ) { // for new 49 line cha ract ers 50 susp end( ); i f ( 51 fmt. ch ! = '\ n' ) bre 52 ak; // igno re n ewli 53 ne } // f or so 54 ut | fmt .ch; / 55 / pr int char acte r 56 } // for s out | " 57 "; / / pr int 58 bloc k se para tor } / 59 / fo r s out | en dl; 60 // p rint gro 61 up s epar ator } / / fo 62 r} / / ma invo id p rt( 63 Form at & fmt , ch ar c 64 h ) { fmt .ch = ch 65 ; res ume( fmt );} 66 // prti nt m ain( ) { 67 Form at f mt; char ch; 68 for ( ; ; ) { s in | 69 ch; // rea 70 d on e ch arac ter if 71 ( e of( sin ) ) brea 72 k; // eof ? p 73 rt( fmt, ch ); } // 74 for} // main // L ocal 75 Var iabl es: //// tab 76 -wid th: 4 // // c ompi 77 le-c omma nd: "cfa fmt 78 Line s.c" /// / En d: / 79 / -
tests/fstream_test.c
r73abe95 r58b6d1b 18 18 int main( void ) { 19 19 int nombre; 20 sout | "Entrez un nombre, s'il vous pla �t:" | endl;20 sout | "Entrez un nombre, s'il vous plaît:" | endl; 21 21 sin | nombre; 22 sout | "Vous avez entr �" | nombre | endl;22 sout | "Vous avez entré" | nombre | endl; 23 23 sout | "le nombre" | nombre | "est" 24 | (nombre > 0 ? "positif" : nombre == 0 ? "z �ro" : "n�gatif") | endl;24 | (nombre > 0 ? "positif" : nombre == 0 ? "zéro" : "négatif") | endl; 25 25 26 sout | "Entrez trois nombres, s'il vous pla �t: " | endl;26 sout | "Entrez trois nombres, s'il vous plaît: " | endl; 27 27 int i, j, k; 28 28 sin | i | j | k; 29 sout | "Vous avez entr �" | "i:" | "" | i | "j:" | "" | j | "k:" | "" | k | endl;29 sout | "Vous avez entré" | "i:" | "" | i | "j:" | "" | j | "k:" | "" | k | endl; 30 30 } 31 31 -
tests/io1.c
r73abe95 r58b6d1b 31 31 | "x =" | 4 32 32 | "x $" | 5 33 | "x �" | 634 | "x �" | 735 | "x �" | 836 | "x �" | 937 | "x �" | 1033 | "x £" | 6 34 | "x ¥" | 7 35 | "x ¡" | 8 36 | "x ¿" | 9 37 | "x «" | 10 38 38 | endl | endl; 39 39 … … 46 46 | 5 | "? x" 47 47 | 6 | "% x" 48 | 7 | " �x"49 | 8 | " �x"48 | 7 | "¢ x" 49 | 8 | "» x" 50 50 | 9 | ") x" 51 51 | 10 | "] x" -
tests/maybe.c
r73abe95 r58b6d1b 15 15 16 16 #include <assert.h> 17 #include <containers/maybe >17 #include <containers/maybe.hfa> 18 18 19 19 void checkPredicates() { -
tests/result.c
r73abe95 r58b6d1b 15 15 16 16 #include <assert.h> 17 #include <containers/result >17 #include <containers/result.hfa> 18 18 19 19 void checkPredicates() { -
tests/time.c
r73abe95 r58b6d1b 14 14 // 15 15 16 #include "time "16 #include "time.hfa" 17 17 #include <fstream.hfa> 18 18
Note: See TracChangeset
for help on using the changeset viewer.