blob: bb9f8bada761c84f53007fab74b0dad1285fbeab [file] [log] [blame]
Keun young Park4bbb5d72012-03-26 18:31:29 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16#include <unistd.h>
17
18#include <gtest/gtest.h>
19#include <utils/threads.h>
20#include <utils/StrongPointer.h>
21
22#include <audio/AudioHardware.h>
23#include <GenericFactory.h>
24#include <audio/AudioRecordingLocal.h>
25
26#include <Log.h>
27
28#include "AudioPlayTestCommon.h"
29
30class AudioRecordingLocalTest : public AudioPlayTestCommon {
31public:
32 virtual ~AudioRecordingLocalTest() {};
33protected:
34
35 android::sp<AudioHardware> createAudioHw() {
36 return AudioHardware::createAudioHw(true, false);
37 }
38};
39
40
41TEST_F(AudioRecordingLocalTest, PlayAllTest) {
42 playAll(1);
43}
44
45TEST_F(AudioRecordingLocalTest, PlayAllRepeatTest) {
46 playAll(4);
47}
48
49TEST_F(AudioRecordingLocalTest, StartStopTest) {
50 repeatPlayStop();
51}
52
53TEST_F(AudioRecordingLocalTest, WrongUsageTest) {
54 playWrongUsage();
55}
56