GLib.test_rand_int

function test_rand_int(): Number(gint32) {
    // Gjs wrapper for g_test_rand_int()
}
  

Get a reproducible random integer number.

The random numbers generated by the g_test_rand_*() family of functions change with every new test program start, unless the --seed option is given when starting test programs.

For individual test cases however, the random number generator is reseeded, to avoid dependencies between tests and to make --seed effective for all test cases.

Since 2.16

Returns

a random number from the seeded random number generator.