Changeset 3067


Ignore:
Timestamp:
Apr 2, 2013, 1:49:53 PM (4 years ago)
Author:
sacerdot
Message:

New test that fails too.

Location:
driver/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • driver/tests/PROBLEMI

    r3062 r3067  
    555. ok
    666. ok
    7 7. ok
     77. LTL failure
    888. ok
  • driver/tests/test7.c

    r2988 r3067  
    1 char foo() {
    2         return 5;
     1char a[] = {3, 2, 7, 1};
     2char treshold = 4;
     3
     4unsigned int count(char(*foo)(char),char *a,int current, int high) {
     5        int n = 0 ;
     6        if (current < high)
     7        {
     8                n = (*foo)(a[current]);
     9                current++;
     10                n += count(foo,a,current,high);
     11        }
     12        return n;
     13}
     14
     15char smaller(char x) {
     16        return (x < treshold);
    317}
    418
    519int main() {
    6         char (*goo)();
    7         goo = foo;
    8         return ((*goo)());
     20        return (count(smaller,a,0,4));
    921}
Note: See TracChangeset for help on using the changeset viewer.