blob: 16935f724f2b73d8c1004b4f5003854c208d4aad [file] [log] [blame]
Eric Carusoea9f10e2019-05-01 09:52:01 -07001// Copyright 2019 The Chromium OS 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 <glib.h>
6
7#include <memory>
8#include <string>
9#include <vector>
10
11#include <gtest/gtest.h>
12
13#include "glib-bridge/glib_logger.h"
14
15namespace glib_bridge {
16
17extern uint64_t g_num_logs;
18
19class GlibUnstructuredLoggerTest : public ::testing::Test {
20 public:
21 GlibUnstructuredLoggerTest() {
22 g_num_logs = 0;
23 ForwardLogs();
24 }
25 ~GlibUnstructuredLoggerTest() override = default;
26};
27
28TEST_F(GlibUnstructuredLoggerTest, TestLogging) {
29 g_message("foo");
30 EXPECT_EQ(g_num_logs, 1);
31}
32
33} // namespace glib_bridge