1 // Copyright 2017 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 #include "quiche/http2/test_tools/http2_structure_decoder_test_util.h"
6 
7 #include <cstddef>
8 
9 namespace http2 {
10 namespace test {
11 
12 // static
Randomize(Http2StructureDecoder * p,Http2Random * rng)13 void Http2StructureDecoderPeer::Randomize(Http2StructureDecoder* p,
14                                           Http2Random* rng) {
15   p->offset_ = rng->Rand32();
16   for (size_t i = 0; i < sizeof p->buffer_; ++i) {
17     p->buffer_[i] = rng->Rand8();
18   }
19 }
20 
21 }  // namespace test
22 }  // namespace http2
23