style: reformat C/C++ sources and headers with clang-format
Run clang-format over all project C/C++ source and header files (.c, .cpp, .cc, .h, .hpp, .hh, .m, .mm) under app/ and tests/. Non-source files (svg, qm, qrc, etc.) were not touched.
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
#include "codec/encoder.h"
|
||||
|
||||
namespace {
|
||||
namespace
|
||||
{
|
||||
class TestEncoder final : public olive::Encoder {
|
||||
public:
|
||||
explicit TestEncoder(const olive::EncodingParams ¶ms)
|
||||
@@ -57,8 +58,8 @@ TEST(CodecEncoder, ImageSequenceFilenames)
|
||||
QStringLiteral("frame_[####].png")),
|
||||
QStringLiteral("frame.png"));
|
||||
|
||||
const QString filename = encoder.GetFilenameForFrame(
|
||||
olive::core::rational(1, 24));
|
||||
const QString filename =
|
||||
encoder.GetFilenameForFrame(olive::core::rational(1, 24));
|
||||
EXPECT_EQ(filename, QStringLiteral("frame_0001.png"));
|
||||
}
|
||||
|
||||
@@ -66,21 +67,18 @@ TEST(CodecEncoder, MatrixGeneration)
|
||||
{
|
||||
using Method = olive::EncodingParams::VideoScalingMethod;
|
||||
|
||||
QMatrix4x4 stretch =
|
||||
olive::EncodingParams::GenerateMatrix(Method::kStretch, 1920, 1080,
|
||||
1280, 720);
|
||||
QMatrix4x4 stretch = olive::EncodingParams::GenerateMatrix(
|
||||
Method::kStretch, 1920, 1080, 1280, 720);
|
||||
EXPECT_TRUE(qFuzzyCompare(stretch(0, 0), 1.0f));
|
||||
EXPECT_TRUE(qFuzzyCompare(stretch(1, 1), 1.0f));
|
||||
|
||||
QMatrix4x4 fit =
|
||||
olive::EncodingParams::GenerateMatrix(Method::kFit, 1920, 1080,
|
||||
1024, 1024);
|
||||
QMatrix4x4 fit = olive::EncodingParams::GenerateMatrix(Method::kFit, 1920,
|
||||
1080, 1024, 1024);
|
||||
EXPECT_TRUE(qFuzzyCompare(fit(0, 0), 1.0f));
|
||||
EXPECT_FALSE(qFuzzyCompare(fit(1, 1), 1.0f));
|
||||
|
||||
QMatrix4x4 crop =
|
||||
olive::EncodingParams::GenerateMatrix(Method::kCrop, 1920, 1080,
|
||||
1024, 1024);
|
||||
QMatrix4x4 crop = olive::EncodingParams::GenerateMatrix(Method::kCrop, 1920,
|
||||
1080, 1024, 1024);
|
||||
EXPECT_FALSE(qFuzzyCompare(crop(0, 0), 1.0f));
|
||||
EXPECT_TRUE(qFuzzyCompare(crop(1, 1), 1.0f));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user