Home | History | Annotate | Download | only in test
      1 /*
      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/AudioPlaybackLocal.h>
     25 
     26 #include <Log.h>
     27 
     28 #include "AudioPlayTestCommon.h"
     29 
     30 class AudioPlaybackLocalTest : public AudioPlayTestCommon {
     31 public:
     32     virtual ~AudioPlaybackLocalTest() {};
     33 protected:
     34 
     35     android::sp<AudioHardware> createAudioHw() {
     36         return AudioHardware::createAudioHw(true, true);
     37     }
     38 };
     39 
     40 
     41 TEST_F(AudioPlaybackLocalTest, PlayAllTest) {
     42     playAll(1);
     43 }
     44 
     45 TEST_F(AudioPlaybackLocalTest, PlayAllRepeatTest) {
     46     playAll(4);
     47 }
     48 
     49 TEST_F(AudioPlaybackLocalTest, StartStopTest) {
     50     repeatPlayStop();
     51 }
     52 
     53 TEST_F(AudioPlaybackLocalTest, WrongUsageTest) {
     54     playWrongUsage();
     55 }
     56 
     57 
     58