Expand gtest coverage across recently changed modules
Adds ~60 new unit tests covering the modules touched in recent bug-fix passes and UI refactors: - RenderTicket: result/finish-count semantics, empty watcher defaults, ticket-reuse rejection - Preferences tabs: behavior options migrated into General/Audio tabs, translation context helper, audio-tab initialization - NodeView: context management, 'Show in Parameter Editor' action wiring - PreviewAutoCacher: construction, pause toggles, single-frame render cancellation, force-cache range - SeekableWidget/TimeBasedWidget: scroll, marker editing, context reset - OCIOLutNode: empty/missing/unsupported LUT paths, string direction values, file-switching regression coverage - ProxyManager: working filename, disabled state, empty proxy fields - Frame/VideoParams/AudioParams/Timecode/ExportFormat/ExportCodec: additional edge-case and enumeration coverage Also fixes the PreferencesAudioTab test crash by initializing AudioManager in the offscreen test environment. All tests pass: ctest --output-on-failure
This commit is contained in:
@@ -15,6 +15,29 @@ TEST(CodecExportFormat, NamesAndExtensions)
|
||||
EXPECT_TRUE(ExportFormat::GetExtension(ExportFormat::kFormatCount).isEmpty());
|
||||
}
|
||||
|
||||
TEST(CodecExportFormat, AllFormatsHaveNames)
|
||||
{
|
||||
using olive::ExportFormat;
|
||||
|
||||
for (int i = 0; i < ExportFormat::kFormatCount; ++i) {
|
||||
const auto fmt = static_cast<ExportFormat::Format>(i);
|
||||
EXPECT_FALSE(ExportFormat::GetName(fmt).isEmpty()) << "Format " << i;
|
||||
}
|
||||
}
|
||||
|
||||
TEST(CodecExportFormat, AllFormatsHaveAtLeastOneCodecList)
|
||||
{
|
||||
using olive::ExportFormat;
|
||||
|
||||
for (int i = 0; i < ExportFormat::kFormatCount; ++i) {
|
||||
const auto fmt = static_cast<ExportFormat::Format>(i);
|
||||
EXPECT_FALSE(ExportFormat::GetVideoCodecs(fmt).isEmpty() &&
|
||||
ExportFormat::GetAudioCodecs(fmt).isEmpty() &&
|
||||
ExportFormat::GetSubtitleCodecs(fmt).isEmpty())
|
||||
<< "Format " << i;
|
||||
}
|
||||
}
|
||||
|
||||
TEST(CodecExportFormat, CodecLists)
|
||||
{
|
||||
using olive::ExportCodec;
|
||||
@@ -42,3 +65,14 @@ TEST(CodecExportFormat, CodecLists)
|
||||
ExportFormat::GetAudioCodecs(ExportFormat::kFormatWAV);
|
||||
EXPECT_EQ(wav_audio, QList<ExportCodec::Codec>{ ExportCodec::kCodecPCM });
|
||||
}
|
||||
|
||||
TEST(CodecExportFormat, MPEG4ContainsH264AndAAC)
|
||||
{
|
||||
using olive::ExportCodec;
|
||||
using olive::ExportFormat;
|
||||
|
||||
EXPECT_TRUE(ExportFormat::GetVideoCodecs(ExportFormat::kFormatMPEG4Video)
|
||||
.contains(ExportCodec::kCodecH264));
|
||||
EXPECT_TRUE(ExportFormat::GetAudioCodecs(ExportFormat::kFormatMPEG4Audio)
|
||||
.contains(ExportCodec::kCodecAAC));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user