添加测试
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "common/Current.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "render/audioparams.h"
|
||||
|
||||
TEST(CommonCurrent, SetAndGetVideoParams)
|
||||
{
|
||||
olive::VideoParams params;
|
||||
params.set_width(1920);
|
||||
params.set_height(1080);
|
||||
Current::getInstance().setCurrentVideoParams(params);
|
||||
|
||||
const olive::VideoParams &stored = Current::getInstance().currentVideoParams();
|
||||
EXPECT_EQ(stored.width(), 1920);
|
||||
EXPECT_EQ(stored.height(), 1080);
|
||||
}
|
||||
|
||||
TEST(CommonCurrent, SetAndGetAudioParams)
|
||||
{
|
||||
olive::AudioParams params;
|
||||
params.set_sample_rate(48000);
|
||||
Current::getInstance().setCurrentAudioParams(params);
|
||||
|
||||
const olive::AudioParams &stored = Current::getInstance().currentAudioParams();
|
||||
EXPECT_EQ(stored.sample_rate(), 48000);
|
||||
}
|
||||
Reference in New Issue
Block a user