Branch: Tag:

2001-02-10

2001-02-10 02:18:49 by Martin Stjernholm <mast@lysator.liu.se>

Modified half of the tail recursion tests to test what they were intended to
test. (Some of them might work simply because the sensitive svalue happen to
be too far up on the stack to trig the bug, though.)

Rev: src/testsuite.in:1.384

1: - test_true([["$Id: testsuite.in,v 1.383 2001/02/08 04:04:41 mast Exp $"]]); + test_true([["$Id: testsuite.in,v 1.384 2001/02/10 02:18:49 mast Exp $"]]);      cond([[all_constants()->_verify_internals]],   [[
483:    }    int a()    { -  ({monitor::lock(), catch { +  foreach (({0, monitor::lock()}), mixed m)    return f (1); // F_CALL_LFUN_AND_RETURN -  }}); +     };   ]]);   test_program([[
499:    mixed g = f;    int a()    { -  ({monitor::lock(), catch { +  foreach (({0, monitor::lock()}), mixed m)    return g (1); // F_CALL_FUNCTION_AND_RETURN -  }}); +     }   ]]);   test_program([[
519:    return compile_string(#"    int g()    { -  ({monitor->lock(), catch { +  foreach (({0, monitor->lock()}), mixed m)    return f (1); // F_APPLY_AND_RETURN -  }}); +     }")()->g();    }   ]]);
537:    }    else {    iter = 1; -  ({monitor::lock(), catch { +  foreach (({0, monitor::lock()}), mixed m)    return a (1); // F_COND_RECUR -  }}); +     }    }   ]]);
559:    }    else {    iter = 2; -  ({monitor::lock(), catch { +  foreach (({0, monitor::lock()}), mixed m)    return a (1); // F_TAIL_RECUR -  }}); +     }    }   ]]);
582:    else {    iter = 2;    int res; -  ({monitor::lock(), catch { +  foreach (({0, monitor::lock()}), mixed m) {    res = a (1); // F_RECUR -  }}); +  iter = random (res);    return res;    }    } -  +  }   ]]);   test_program([[    inherit Thread.Mutex : monitor;
605:    }    else {    iter = 2; -  ({monitor::lock(), catch { +  foreach (({0, monitor::lock()}), mixed m) {    a (1); // F_RECUR_AND_POP -  }}); +     return iter;    }    } -  +  }   ]]);      test_false([[object_variablep(class X { int y; int z() { return 1; }}(),"foo")]])