Changeset 1e3d5b6


Ignore:
Timestamp:
Jan 5, 2017, 10:51:50 AM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
6c3a988f
Parents:
4c8621ac
Message:

updated tupleVariadic test to include recursive example

Location:
src/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tests/.expect/tupleVariadic.txt

    r4c8621ac r1e3d5b6  
    99called ?{} with a: 10 2 3 4
    1010array = { 10, 2, 3, 4, }
     11calling func
     12called process(int) 3
     13called process(double) 2
     14called process(int) 111
     15called process(double) 4.145
     16called func(void)
     17finished func
  • src/tests/tupleVariadic.c

    r4c8621ac r1e3d5b6  
    1313// Update Count     : 2
    1414//
     15
     16void func(void) {
     17        printf("called func(void)\n");
     18}
     19forall(otype T, ttype Params | { void process(T); void func(Params); })
     20void func(T arg1, Params p) {
     21        process(arg1);
     22        func(p);
     23}
     24void process(int x) {
     25        printf("called process(int) %d\n", x);
     26}
     27void process(double x) {
     28        printf("called process(double) %g\n", x);
     29}
    1530
    1631forall(otype T) T * malloc();
     
    93108        array * x4 = new(10, 2, 3, 4);
    94109        print(x4);
     110        printf("calling func\n");
     111        func(3, 2.0, 111, 4.145);
     112        printf("finished func\n");
    95113}
    96114
Note: See TracChangeset for help on using the changeset viewer.