test: replace fake and duplicate tests with real assertions
Fake tests rewritten to assert real behavior: - audio_smoke: conversion tests now actually Convert() samples and verify output; waveform length/summary assertions tightened to exact values - plugin_format_conversion: RowBytes/U8ToU16/LoadImageFile now call real production code (VideoParams::GetBytesPerPixel, sws scaler, OIIO decode of tests/img.png with known pixel values) - core_color: HSV round trip now verifies fromHsv(toHsv(c)) == c instead of comparing toHsv against its own accessors - core_bezier/node_inputimmediate: expected values replaced with independently derived constants instead of re-running the code under test - common_commandlineparser/common_debug/common_jobtime: capture stdout/stderr/qDebug and assert actual output content - proxy_manager: ProxyFinished test now drives a real proxy job instead of emitting the signal itself; proxy_dialog/panel/proxy/preferences/timeruler tests assert real widget state - viewer_smoke/preview_autocacher/render_misc: zero-assertion tests given observable-state assertions or removed where nothing is observable Duplicates removed: - plugin_smoke_test.cpp: 18 tests duplicated from plugin_paraminstance / plugin_support_* / plugin_renderer_readback (751 -> 180 lines) - module_smoke HumanStrings tests covered precisely by ui_humanstrings_test - render_misc duplicate kDefaultInterpolation constant check Removed by policy (skip allowed, never disabled): - all DISABLED_ prefixes: re-enabled as real offscreen tests or deleted - ffmpeg_decoder_hw: hardcoded personal path replaced with OAK_TEST_HW_DECODE_FILE env var, GTEST_SKIP when unset Also: - config_test: restore Config defaults after run (cross-test pollution) - render_worker_footage: drop /tmp debug-output scaffolding - previewaudiodevice construction test asserts the real bugfix
This commit is contained in:
@@ -783,11 +783,49 @@ TEST_F(TimelineUndoGeneralTest, AddDefaultTransitionAddsDualTransition)
|
||||
|
||||
TEST_F(TimelineUndoGeneralTest, AddDefaultTransitionEmptyClipListIsHarmless)
|
||||
{
|
||||
// A real timeline with two adjacent clips; the empty command must leave
|
||||
// every observable detail of it untouched
|
||||
olive::Sequence *sequence = CreateSequence(project_.get());
|
||||
olive::TrackList *list = sequence->track_list(olive::Track::kVideo);
|
||||
olive::Track *track = CreateTrack(project_.get());
|
||||
olive::ClipBlock *a = CreateClip(project_.get(), olive::core::rational(4));
|
||||
olive::ClipBlock *b = CreateClip(project_.get(), olive::core::rational(4));
|
||||
track->AppendBlock(a);
|
||||
track->AppendBlock(b);
|
||||
AppendTrackToList(list, track);
|
||||
// Layout: a [0,4], b [4,8]
|
||||
|
||||
olive::TimelineAddDefaultTransitionCommand cmd(
|
||||
{}, olive::core::rational(1, 30));
|
||||
EXPECT_EQ(cmd.GetRelevantProject(), nullptr);
|
||||
|
||||
// redo/undo on an empty command must be harmless no-ops
|
||||
// redo on an empty command adds no transitions and changes nothing
|
||||
cmd.redo_now();
|
||||
ASSERT_EQ(track->Blocks().size(), 2);
|
||||
EXPECT_EQ(track->Blocks().at(0), a);
|
||||
EXPECT_EQ(track->Blocks().at(1), b);
|
||||
EXPECT_EQ(a->length(), olive::core::rational(4));
|
||||
EXPECT_EQ(a->media_in(), olive::core::rational(0));
|
||||
EXPECT_EQ(a->in(), olive::core::rational(0));
|
||||
EXPECT_EQ(a->out(), olive::core::rational(4));
|
||||
EXPECT_EQ(b->length(), olive::core::rational(4));
|
||||
EXPECT_EQ(b->media_in(), olive::core::rational(0));
|
||||
EXPECT_EQ(b->in(), olive::core::rational(4));
|
||||
EXPECT_EQ(b->out(), olive::core::rational(8));
|
||||
EXPECT_EQ(track->track_length(), olive::core::rational(8));
|
||||
|
||||
// undo is equally a no-op
|
||||
cmd.undo_now();
|
||||
ASSERT_EQ(track->Blocks().size(), 2);
|
||||
EXPECT_EQ(track->Blocks().at(0), a);
|
||||
EXPECT_EQ(track->Blocks().at(1), b);
|
||||
EXPECT_EQ(a->length(), olive::core::rational(4));
|
||||
EXPECT_EQ(a->media_in(), olive::core::rational(0));
|
||||
EXPECT_EQ(a->in(), olive::core::rational(0));
|
||||
EXPECT_EQ(a->out(), olive::core::rational(4));
|
||||
EXPECT_EQ(b->length(), olive::core::rational(4));
|
||||
EXPECT_EQ(b->media_in(), olive::core::rational(0));
|
||||
EXPECT_EQ(b->in(), olive::core::rational(4));
|
||||
EXPECT_EQ(b->out(), olive::core::rational(8));
|
||||
EXPECT_EQ(track->track_length(), olive::core::rational(8));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user