Skip to content

Commit

Permalink
Added #ifdef's to pump to allow for disable commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Rick committed Dec 11, 2023
1 parent abe16df commit b99d161
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tests/roc_sndio/test_pump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
#include "roc_core/stddefs.h"
#include "roc_core/temp_file.h"
#include "roc_sndio/pump.h"
#ifdef ROC_TARGET_SOX
#include "roc_sndio/sox_sink.h"
#include "roc_sndio/sox_source.h"
#endif //ROC_TARGET_SOX
#ifdef ROC_TARGET_SNDFILE
#include "roc_sndio/sndfile_sink.h"
#include "roc_sndio/sndfile_source.h"
#endif //ROC_TARGET_SNDFILE

namespace roc {
namespace sndio {
Expand Down Expand Up @@ -50,6 +54,7 @@ TEST_GROUP(pump) {
};

TEST(pump, write_read) {
#ifdef ROC_TARGET_SOX
{
enum { NumSamples = BufSize * 10 };

Expand Down Expand Up @@ -82,7 +87,9 @@ TEST(pump, write_read) {

mock_writer.check(0, mock_source.num_returned());
}
#endif //ROC_TARGET_SOX

#ifdef ROC_TARGET_SNDFILE
{
enum { NumSamples = BufSize * 10 };

Expand Down Expand Up @@ -115,9 +122,11 @@ TEST(pump, write_read) {

mock_writer.check(0, mock_source.num_returned());
}
#endif //ROC_TARGET_SNDFILE
}

TEST(pump, write_overwrite_read) {
#ifdef ROC_TARGET_SOX
{
enum { NumSamples = BufSize * 10 };

Expand Down Expand Up @@ -166,7 +175,9 @@ TEST(pump, write_overwrite_read) {

mock_writer.check(num_returned1, num_returned2);
}
#endif //ROC_TARGET_SOX

#ifdef ROC_TARGET_SNDFILE
{
enum { NumSamples = BufSize * 10 };

Expand Down Expand Up @@ -215,6 +226,7 @@ TEST(pump, write_overwrite_read) {

mock_writer.check(num_returned1, num_returned2);
}
#endif //ROC_TARGET_SNDFILE
}

} // namespace sndio
Expand Down

0 comments on commit b99d161

Please sign in to comment.