OLD | NEW |
| (Empty) |
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 | |
5 // Support functions for running "internal" tests. These functions are not for | |
6 // public consumption. | |
7 | |
8 #ifndef MOJO_PUBLIC_CPP_TEST_SUPPORT_TEST_SUPPORT_H_ | |
9 #define MOJO_PUBLIC_CPP_TEST_SUPPORT_TEST_SUPPORT_H_ | |
10 | |
11 #include <stdio.h> | |
12 | |
13 #include <string> | |
14 #include <vector> | |
15 | |
16 namespace mojo { | |
17 namespace test { | |
18 | |
19 // Logs the result of a perf test. (|sub_test_name| is optional and may be | |
20 // null.) You may only call this while running inside a perf test suite. | |
21 void LogPerfResult(const char* test_name, | |
22 const char* sub_test_name, | |
23 double value, | |
24 const char* units); | |
25 | |
26 // Opens a text file given by a path relative to the source root for reading. | |
27 FILE* OpenSourceRootRelativeFile(const std::string& relative_path); | |
28 | |
29 // Returns the list of regular files in a directory given by a path relative to | |
30 // the source root. (The result only includes the filenames, not the path.) | |
31 std::vector<std::string> EnumerateSourceRootRelativeDirectory( | |
32 const std::string& relative_path); | |
33 | |
34 } // namespace test | |
35 } // namespace mojo | |
36 | |
37 #endif // MOJO_PUBLIC_CPP_TEST_SUPPORT_TEST_SUPPORT_H_ | |
OLD | NEW |