blob: be6647b7a5400dc5f6c90962b1db17648b76bbfd [file] [log] [blame]
hta@webrtc.org86a6aac2012-06-18 13:22:08 +00001/*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
pbos@webrtc.orgacaf3a12013-05-27 15:07:45 +000011#include "webrtc/system_wrappers/source/unittest_utilities.h"
hta@webrtc.org86a6aac2012-06-18 13:22:08 +000012
pbos@webrtc.orgacaf3a12013-05-27 15:07:45 +000013#include "testing/gtest/include/gtest/gtest.h"
14#include "webrtc/system_wrappers/interface/trace.h"
hta@webrtc.org86a6aac2012-06-18 13:22:08 +000015
16namespace webrtc {
17
18// These tests merely check that the code compiles and that no
19// fatal accidents happen when logging.
20TEST(UnittestUtilities, TraceOn) {
21 ScopedTracing trace(true);
22 WEBRTC_TRACE(kTraceInfo, kTraceUtility, 0, "Log line that should appear");
23 // TODO(hta): Verify that output appears.
24 // Note - output is written on another thread, so can take time to appear.
25}
26
27TEST(UnittestUtilities, TraceOff) {
28 ScopedTracing trace(false);
29 WEBRTC_TRACE(kTraceInfo, kTraceUtility, 0,
30 "Log line that should not appear");
31 // TODO(hta): Verify that no output appears.
32}
33
34} // namespace webrtc