1/*
2 *  Copyright (c) 2011 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
11#include "webrtc/common_types.h"
12#include "webrtc/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h"
13
14using namespace webrtc;
15
16class HardwareBeforeInitializingTest : public BeforeInitializationFixture {
17};
18
19TEST_F(HardwareBeforeInitializingTest,
20       SetAudioDeviceLayerAcceptsPlatformDefaultBeforeInitializing) {
21  AudioLayers wanted_layer = kAudioPlatformDefault;
22  AudioLayers given_layer;
23  EXPECT_EQ(0, voe_hardware_->SetAudioDeviceLayer(wanted_layer));
24  EXPECT_EQ(0, voe_hardware_->GetAudioDeviceLayer(given_layer));
25  EXPECT_EQ(wanted_layer, given_layer) <<
26      "These should be the same before initializing.";
27}
28