Changeset 2574


Ignore:
Timestamp:
Oct 28, 2012, 1:50:54 PM (6 years ago)
Author:
ksherdy
Message:

Updated / added visitor test cases.

Location:
proto/pablo/input/test/visitors
Files:
5 added
1 deleted
2 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • proto/pablo/input/test/visitors/AdvanceCombiner/advance.pablo

    r2536 r2574  
    77       
    88        temp = Advance(X,2);                            // Expected
    9         temp = Advance(Advance(X));             // Transform to expected
     9        temp = Advance(Advance(X));             // Translated to Expected
    1010       
    1111        temp = Advance(X,2);                            // Expected
    12         temp = Advance(pablo.Advance(X));       // Transform to expected
     12        temp = Advance(pablo.Advance(X));       // Translated to Expected
    1313       
    1414        temp = Advance(X,3);
  • proto/pablo/input/test/visitors/AugmentedAssignment/augmentedAssignment.pablo

    r2537 r2574  
    44        var stream z;
    55
    6         x = x | y;
    7         x |= y;
     6        x = x | y;                      // Expected
     7        x |= y;                         // Translated to Expected
    88                         
    9         x = x & y;
    10         x &= y;
     9        x = x & y;                      // Expected
     10        x &= y;                         // Translated to Expected
    1111       
    1212        x = x ^ y;
  • proto/pablo/input/test/visitors/CarryIntroCiCo/atEOF.pablo

    r2536 r2574  
    22        var stream<1> X;
    33        var stream<1> R;
    4        
    5         // Non-final block - Not under test.
     4               
    65        /*
    7         simd_1___constant_0_();
     6        simd<1>::constant<0>();
    87        atEOF(X);
    9 
    10         // Non-final block
    11         functionCall(inFile(X));
    12         functionCall(X);
    138        */
    14                
    15         // Final block tests
    16         R = simd_andc(X, EOF_mask);
    17         R = atEOF(X);   
    18 
    19         R = functionCall(simd_and(X,EOF_mask));
    20         R = functionCall(inFile(X));
    21        
    229}
  • proto/pablo/input/test/visitors/CarryIntroCiCo/carryIntro.pablo

    r2536 r2574  
    11function void Test() {
    22        var stream temp;
    3         var stream C;
    4         var stream X;
    5         var stream R;
     3        var stream C;   // Cursor stream
     4        var stream M;   // Marker stream
     5        var stream R;   // Result stream
    66       
    7         /*
    87       
    9         R = carryQ.BitBlock_advance_ci_co(X,carryQ.get_carry_in(0),0);
    10         R = Advance(X);
     8        R = CarryQ.BitBlock_advance_ci_co(C,CarryQ.get_carry_in(0),0);  // Expected
     9        R = Advance(C);                                                                                                 // Translated
     10               
     11        R = CarryQ.BitBlock_advance_ci_co(C,CarryQ.get_carry_in(1),1);
     12        R = pablo.Advance(C);
    1113       
    12         R = carryQ.BitBlock_advance_ci_co(X,carryQ.get_carry_in(0),0);
    13         R = pablo.Advance(X);
     14        R = CarryQ.BitBlock_scantofirst(C,M,CarryQ.get_carry_in(2),2);
     15        R = ScanToFirst(C,M);
    1416
    15         R = carryQ.BitBlock_scantofirst(C,X,carryQ.get_carry_in(0),0);
    16         R = ScanToFirst(X);
    17        
    18         R = carryQ.BitBlock_scantofirst(C,X,carryQ.get_carry_in(0),0); 
    19         R = pablo.ScanToFirst(X);
     17        R = CarryQ.BitBlock_scantofirst(C,M,CarryQ.get_carry_in(3),3); 
     18        R = pablo.ScanToFirst(C,M);
    2019
    21         R = carryQ.BitBlock_scanthru_ci_co(C,X,carryQ.get_carry_in(0),0);
     20        R = CarryQ.BitBlock_scanthru_ci_co(C,X,CarryQ.get_carry_in(4),4);
    2221        R = ScanThru(C,X);
    23        
    24         R = carryQ.BitBlock_scanthru_ci_co(C,X,carryQ.get_carry_in(0),0);
     22
     23        R = CarryQ.BitBlock_scanthru_ci_co(C,X,CarryQ.get_carry_in(5),5);
    2524        R = pablo.ScanThru(C,X);
    2625
    27         R = carryQ.BitBlock_scanto_ci_co(C,X,carryQ.get_carry_in(0),0);
     26        R = CarryQ.BitBlock_scanto_ci_co(C,X,CarryQ.get_carry_in(6),6);
    2827        R = ScanTo(C,X);
    2928       
    30         R = carryQ.BitBlock_scanto_ci_co(C,X,carryQ.get_carry_in(0),0);
     29        R = CarryQ.BitBlock_scanto_ci_co(C,X,CarryQ.get_carry_in(7),7);
    3130        R = pablo.ScanTo(C,X);
    3231
    33         R = carryQ.BitBlock_advance_then_scanthru(C,X,carryQ.get_carry_in(0),0);
     32        R = CarryQ.BitBlock_advance_then_scanthru(C,X,CarryQ.get_carry_in(8),8);
    3433        R = AdvanceThenScanThru(C,X);
    3534       
    36         R = carryQ.BitBlock_advance_then_scanthru(C,X,carryQ.get_carry_in(0),0);       
     35        R = CarryQ.BitBlock_advance_then_scanthru(C,X,CarryQ.get_carry_in(9),9);       
    3736        R = pablo.AdvanceThenScanThru(C,X);
    3837
    39         R = carryQ.BitBlock_advance_then_scanto(C,X,carryQ.get_carry_in(0),0);                 
     38        R = CarryQ.BitBlock_advance_then_scanto(C,X,CarryQ.get_carry_in(10),10);                       
    4039        R = AdvanceThenScanTo(C,X);
    4140       
    42         R = carryQ.BitBlock_advance_then_scanto(C,X,carryQ.get_carry_in(0),0); 
     41        R = CarryQ.BitBlock_advance_then_scanto(C,X,CarryQ.get_carry_in(11),11);       
    4342        R = pablo.AdvanceThenScanTo(C,X);
    4443
    45         R = carryQ.BitBlock_span_upto(C,X,carryQ.get_carry_in(0),0);
     44        R = CarryQ.BitBlock_span_upto(C,X,CarryQ.get_carry_in(12),12);
    4645        R = SpanUpTo(C,X);
    4746       
    48         R = carryQ.BitBlock_span_upto(C,X,carryQ.get_carry_in(0),0);   
     47        R = CarryQ.BitBlock_span_upto(C,X,CarryQ.get_carry_in(13),13); 
    4948        R = pablo.SpanUpTo(C,X);
    5049               
    51         R = carryQ.BitBlock_inclusive_span(C,X,carryQ.get_carry_in(0),0);       
     50        R = CarryQ.BitBlock_inclusive_span(C,X,CarryQ.get_carry_in(14),14);     
    5251        R = InclusiveSpan(C,X);
    5352       
    54         R = carryQ.BitBlock_inclusive_span(C,X,carryQ.get_carry_in(0),0);       
     53        R = CarryQ.BitBlock_inclusive_span(C,X,CarryQ.get_carry_in(15),15);     
    5554        R = pablo.InclusiveSpan(C,X);                   
    5655
    57         R = carryQ.BitBlock_exclusive_span(C,X,carryQ.get_carry_in(0),0);       
     56        R = CarryQ.BitBlock_exclusive_span(C,X,CarryQ.get_carry_in(16),16);     
    5857        R = ExclusiveSpan(C,X);
    5958       
    60         R = carryQ.BitBlock_exclusive_span(C,X,carryQ.get_carry_in(0),0);               
     59        R = CarryQ.BitBlock_exclusive_span(C,X,CarryQ.get_carry_in(17),17);             
    6160        R = pablo.ExclusiveSpan(C,X);                   
    6261               
Note: See TracChangeset for help on using the changeset viewer.