refactor: decouple tests

This commit is contained in:
Petr Mironychev
2026-07-22 10:28:19 +02:00
parent 583b5de14c
commit f6f45a3f15
54 changed files with 7180 additions and 5758 deletions

50
tests/SessionTest.hpp Normal file
View File

@@ -0,0 +1,50 @@
// Copyright (C) 2026 Petr Mironychev
// SPDX-License-Identifier: GPL-3.0-or-later
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
#pragma once
#include <QObject>
namespace QodeAssist {
class SessionTest final : public QObject
{
Q_OBJECT
private slots:
void testSessionAppendsUserTurnBeforeSending();
void testSessionStreamsTextThinkingAndTools();
void testSessionTrimsStreamedText();
void testSessionAbandoningTheTurnCancelsTheBackend();
void testSwitchingBackendsCancelsTheActiveTurn();
void testSessionForwardsTitleFromTheEventStream();
void testSessionProjectionMatchesHistory();
void testSessionAccumulatesStreamedThinking();
void testSessionKeepsThinkingAfterToolContinuation();
void testSessionDropsPreToolTextWhenAsked();
void testSessionToolResultAppendsFileEditRow();
void testSessionRepeatedToolResultKeepsOneFileEdit();
void testRunningToolStatusInterruptsOnTurnEnd();
void testRunningToolStatusInterruptsOnLoad();
void testAgentDiffBecomesAppliedFileEdit();
void testAgentDiffSkipsUnrevertableRegistrations();
void testAgentFileEditRevertRoundTrip();
void testSessionIgnoresEchoedFileEditMarker();
void testSessionTruncationKeepsBlockOrder();
void testHistorySnapshotReportsUnreadableBlocks();
void testSessionUsageLandsOnTheTurn();
void testSessionIgnoresEventsFromOtherTurns();
void testSessionReportsFailureWithoutStartedTurn();
void testSessionIgnoresFailureFromAbandonedTurn();
void testSessionTruncateRowsRewritesHistory();
void testSessionUpsertsAgentToolCalls();
void testLlmToolLifecycleFlowsThroughOneEvent();
void testSessionKeepsOnePlanPerTurn();
void testAgentActivityKeepsStreamedTextIntact();
void testAgentToolUpdateTouchesOnlyItsOwnRow();
void testUsageSkipsRowsThatCannotShowIt();
void testAgentActivityBlocksSurviveReload();
};
} // namespace QodeAssist