blob: cae4b9a7c1c9343f612bdcc825ef79e688419016 [file] [log] [blame]
Viet-Trung Luucb678492015-10-28 12:46:54 -07001// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Pseudorandom number generation for tests.
6
7#ifndef MOJO_EDK_SYSTEM_TEST_RANDOM_H_
8#define MOJO_EDK_SYSTEM_TEST_RANDOM_H_
9
10namespace mojo {
11namespace system {
12namespace test {
13
14// Returns a (uniformly) (pseudo)random integer in the interval [min, max].
15// Currently, |max - min| must be at most |RAND_MAX| and must also be (strictly)
16// less than |INT_MAX|.
17int RandomInt(int min, int max);
18
19} // namespace test
20} // namespace system
21} // namespace mojo
22
23#endif // MOJO_EDK_SYSTEM_TEST_RANDOM_H_