pike.git / lib / modules / Random.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/Random.pmod/testsuite.in:189:   test_any([[    int sz;    Random.Interface r = Random.Fast();    for(int i; i<128; i++)    sz += sizeof(r->random_string(9001));    return sz;   ]], 1152128)      test_do( add_constant("real_random") )    + test_do([[ + mapping(string:int) states = ([]); +  +  void get_state () +  { +  // Something in the following code confuses the runtime. +  random_seed(time(1)); +  int i = random(65535); +  // The cast complains about casting a mapping. +  if (states[(string) i]) i = random(65535); +  }; +  +  get_state(); + ]]) +    END_MARKER