1*3f982cf4SFabien Sanglard // Copyright 2020 The Chromium Authors. All rights reserved. 2*3f982cf4SFabien Sanglard // Use of this source code is governed by a BSD-style license that can be 3*3f982cf4SFabien Sanglard // found in the LICENSE file. 4*3f982cf4SFabien Sanglard 5*3f982cf4SFabien Sanglard #ifndef PLATFORM_IMPL_LOGGING_TEST_H_ 6*3f982cf4SFabien Sanglard #define PLATFORM_IMPL_LOGGING_TEST_H_ 7*3f982cf4SFabien Sanglard 8*3f982cf4SFabien Sanglard #include <string> 9*3f982cf4SFabien Sanglard #include <vector> 10*3f982cf4SFabien Sanglard 11*3f982cf4SFabien Sanglard // These functions should only be called from logging unittests. 12*3f982cf4SFabien Sanglard 13*3f982cf4SFabien Sanglard namespace openscreen { 14*3f982cf4SFabien Sanglard 15*3f982cf4SFabien Sanglard // Append logging output to |messages|. Each log entry will be written as a new 16*3f982cf4SFabien Sanglard // element including a newline. Pass nullptr to stop appending output. Calling 17*3f982cf4SFabien Sanglard // this does not affect the behavior of SetLogFifoOrDie(). Normally this should 18*3f982cf4SFabien Sanglard // only be called for tests as it creates an append-only buffer of log messages 19*3f982cf4SFabien Sanglard // in memory. 20*3f982cf4SFabien Sanglard void SetLogBufferForTest(std::vector<std::string>* messages); 21*3f982cf4SFabien Sanglard 22*3f982cf4SFabien Sanglard } // namespace openscreen 23*3f982cf4SFabien Sanglard 24*3f982cf4SFabien Sanglard #endif // PLATFORM_IMPL_LOGGING_TEST_H_ 25