allow_check_is_test_to_be_called.h 645 B

12345678910111213141516171819
  1. // Copyright 2022 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. #ifndef BASE_TEST_ALLOW_CHECK_IS_TEST_TO_BE_CALLED_H_
  5. #define BASE_TEST_ALLOW_CHECK_IS_TEST_TO_BE_CALLED_H_
  6. namespace base::test {
  7. // This is to be called exactly once when starting unit or browser tests to
  8. // allow test-only code paths that contain `CHECK_IS_TEST()`.
  9. //
  10. // Note: This function must not be called in production code, but only in
  11. // tests.
  12. void AllowCheckIsTestToBeCalled();
  13. } // namespace base::test
  14. #endif // BASE_TEST_ALLOW_CHECK_IS_TEST_TO_BE_CALLED_H_