Viet-Trung Luu | cb67849 | 2015-10-28 12:46:54 -0700 | [diff] [blame] | 1 | // 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 | |
| 10 | namespace mojo { |
| 11 | namespace system { |
| 12 | namespace 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|. |
| 17 | int RandomInt(int min, int max); |
| 18 | |
| 19 | } // namespace test |
| 20 | } // namespace system |
| 21 | } // namespace mojo |
| 22 | |
| 23 | #endif // MOJO_EDK_SYSTEM_TEST_RANDOM_H_ |