test_support_private.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2014 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 MOJO_PUBLIC_TESTS_TEST_SUPPORT_PRIVATE_H_
  5. #define MOJO_PUBLIC_TESTS_TEST_SUPPORT_PRIVATE_H_
  6. #include <stdio.h>
  7. #include "mojo/public/c/test_support/test_support.h"
  8. namespace mojo {
  9. namespace test {
  10. // Implementors of the test support APIs can use this interface to install their
  11. // implementation into the mojo_test_support dynamic library.
  12. class TestSupport {
  13. public:
  14. virtual ~TestSupport();
  15. static void Init(TestSupport* test_support);
  16. static TestSupport* Get();
  17. static void Reset();
  18. virtual void LogPerfResult(const char* test_name,
  19. const char* sub_test_name,
  20. double value,
  21. const char* units) = 0;
  22. virtual FILE* OpenSourceRootRelativeFile(const char* relative_path) = 0;
  23. virtual char** EnumerateSourceRootRelativeDirectory(
  24. const char* relative_path) = 0;
  25. };
  26. } // namespace test
  27. } // namespace mojo
  28. #endif // MOJO_PUBLIC_TESTS_TEST_SUPPORT_PRIVATE_H_