Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
soohyun0131-lee committed Apr 7, 2021
1 parent 19e7ae0 commit 61dff4f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
13 changes: 0 additions & 13 deletions tests/tmp/audiotest.cpp → tests/tmp/bgmtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,15 @@ int main() {
BgmPipeline *obj = new BgmPipeline();
obj->SetBGM(mp3dir);

// std::string mp3dir2 =
// "C:\\Users\\User\\Desktop\\workspace\\kingdbengine\\tests\\resource\\freejazz.mp3";
// AudioObj *obj2 = new AudioObj(mp3dir2);

// obj2->Play();
sleep(10);

obj->SetBGM(newMp3dir);

sleep(10);
obj->SetBGM(mp3dir);

sleep(10);
obj->Pause();
// obj2->Pause();

// sleep(5);
obj->Unload();
// obj2->Unload();

delete obj;
// delete obj2;

return 0;
}
34 changes: 34 additions & 0 deletions tests/tmp/effecttest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include <gst/gst.h>
#include <unistd.h>

#include <iostream>
#include <string>

#include "effectpipeline.h"

int main() {
std::string mp3dir =
"C:"
"\\Users\\User\\Desktop\\workspace\\kingdbengine\\tests\\resource\\kingdb"
"1_resource.mp3";

std::string newMp3dir =
"C:"
"\\Users\\User\\Desktop\\workspace\\kingdbengine\\tests\\resource\\freeja"
"zz.mp3";

EffectPipeline *obj = new EffectPipeline();
obj->AddEffect(mp3dir);

sleep(10);

obj->AddEffect(newMp3dir);
obj->Play();

sleep(10);

obj->Unload();
delete obj;

return 0;
}
2 changes: 1 addition & 1 deletion tests/tmp/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
audioinc = include_directories('../../Modules/Audio')
pipelineinc = include_directories('../../Modules/Audio/pipeline')

tmpsrc = ['audiotest.cpp']
tmpsrc = ['effecttest.cpp']

testexe = executable(
'kingdbtest', tmpsrc,
Expand Down

0 comments on commit 61dff4f

Please sign in to comment.