Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1823)

Side by Side Diff: mojo/public/tests/test_support_private.cc

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/public/tests/test_support_private.h ('k') | mojo/public/third_party/ply/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/tests/test_support_private.h" 5 #include "mojo/public/tests/test_support_private.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
11 static mojo::test::TestSupport* g_test_support = NULL; 11 static mojo::test::TestSupport* g_test_support = NULL;
12 12
13 extern "C" { 13 extern "C" {
14 14
15 void MojoTestSupportLogPerfResult(const char* test_name, 15 void MojoTestSupportLogPerfResult(const char* test_name,
16 const char* sub_test_name,
16 double value, 17 double value,
17 const char* units) { 18 const char* units) {
18 if (g_test_support) 19 if (g_test_support) {
19 g_test_support->LogPerfResult(test_name, value, units); 20 g_test_support->LogPerfResult(test_name, sub_test_name, value, units);
20 else 21 } else {
21 printf("[no test runner]\t%s\t%g\t%s\n", test_name, value, units); 22 if (sub_test_name) {
23 printf("[no test runner]\t%s/%s\t%g\t%s\n", test_name, sub_test_name,
24 value, units);
25 } else {
26 printf("[no test runner]\t%s\t%g\t%s\n", test_name, value, units);
27 }
28 }
22 } 29 }
23 30
24 FILE* MojoTestSupportOpenSourceRootRelativeFile(const char* relative_path) { 31 FILE* MojoTestSupportOpenSourceRootRelativeFile(const char* relative_path) {
25 if (g_test_support) 32 if (g_test_support)
26 return g_test_support->OpenSourceRootRelativeFile(relative_path); 33 return g_test_support->OpenSourceRootRelativeFile(relative_path);
27 printf("[no test runner]\n"); 34 printf("[no test runner]\n");
28 return NULL; 35 return NULL;
29 } 36 }
30 37
31 char** MojoTestSupportEnumerateSourceRootRelativeDirectory( 38 char** MojoTestSupportEnumerateSourceRootRelativeDirectory(
(...skipping 28 matching lines...) Expand all
60 return g_test_support; 67 return g_test_support;
61 } 68 }
62 69
63 // static 70 // static
64 void TestSupport::Reset() { 71 void TestSupport::Reset() {
65 g_test_support = NULL; 72 g_test_support = NULL;
66 } 73 }
67 74
68 } // namespace test 75 } // namespace test
69 } // namespace mojo 76 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/tests/test_support_private.h ('k') | mojo/public/third_party/ply/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698