xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/common/platform/api/quiche_testvalue.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2020 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 #ifndef QUICHE_COMMON_PLATFORM_API_QUICHE_TESTVALUE_H_
6 #define QUICHE_COMMON_PLATFORM_API_QUICHE_TESTVALUE_H_
7 
8 #include "quiche_platform_impl/quiche_testvalue_impl.h"
9 
10 #include "absl/strings/string_view.h"
11 
12 namespace quiche {
13 
14 // Interface allowing injection of test-specific code in production codepaths.
15 // |label| is an arbitrary value identifying the location, and |var| is a
16 // pointer to the value to be modified.
17 //
18 // Note that this method does nothing in Chromium.
19 template <class T>
AdjustTestValue(absl::string_view label,T * var)20 void AdjustTestValue(absl::string_view label, T* var) {
21   AdjustTestValueImpl(label, var);
22 }
23 
24 }  // namespace quiche
25 
26 #endif  // QUICHE_COMMON_PLATFORM_API_QUICHE_TESTVALUE_H_
27