KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_text_diff.cpp File Reference

Go to the source code of this file.

Classes

struct  TEXT_DIFF_LINE
 

Enumerations

enum class  TEXT_DIFF_KIND
 

Functions

static wxString render (const std::vector< TEXT_DIFF_LINE > &aLines)
 
 BOOST_AUTO_TEST_CASE (IdenticalFilesAreAllContext)
 
 BOOST_AUTO_TEST_CASE (ChangedLineIsRemovedThenAdded)
 
 BOOST_AUTO_TEST_CASE (InsertionAndDeletionKeepSurroundingContext)
 
 BOOST_AUTO_TEST_CASE (EmptySidesShowWholeFile)
 
 BOOST_AUTO_TEST_CASE (SplitHandlesLineEndings)
 
 BOOST_AUTO_TEST_CASE (TallNarrowTableFindsSharedLine)
 
 BOOST_AUTO_TEST_CASE (SharedLineInTheMiddleIsContext)
 
 BOOST_AUTO_TEST_CASE (BinarySniffFindsNulByte)
 
 BOOST_AUTO_TEST_CASE (OversizedPairFallsBackToWholeFileDiff)
 

Enumeration Type Documentation

◆ TEXT_DIFF_KIND

enum class KIGIT::TEXT_DIFF_KIND
strong

Definition at line 36 of file text_diff.h.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/9]

BOOST_AUTO_TEST_CASE ( BinarySniffFindsNulByte )

Definition at line 163 of file test_text_diff.cpp.

References KIGIT::TextLooksBinary().

◆ BOOST_AUTO_TEST_CASE() [2/9]

BOOST_AUTO_TEST_CASE ( ChangedLineIsRemovedThenAdded )

Definition at line 58 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), KIGIT::BuildTextDiff(), and render().

◆ BOOST_AUTO_TEST_CASE() [3/9]

BOOST_AUTO_TEST_CASE ( EmptySidesShowWholeFile )

Definition at line 78 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), KIGIT::BuildTextDiff(), and render().

◆ BOOST_AUTO_TEST_CASE() [4/9]

BOOST_AUTO_TEST_CASE ( IdenticalFilesAreAllContext )

Definition at line 50 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), KIGIT::BuildTextDiff(), and render().

◆ BOOST_AUTO_TEST_CASE() [5/9]

BOOST_AUTO_TEST_CASE ( InsertionAndDeletionKeepSurroundingContext )

Definition at line 67 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), KIGIT::BuildTextDiff(), and render().

◆ BOOST_AUTO_TEST_CASE() [6/9]

BOOST_AUTO_TEST_CASE ( OversizedPairFallsBackToWholeFileDiff )

Definition at line 177 of file test_text_diff.cpp.

References BOOST_REQUIRE(), and KIGIT::BuildTextDiff().

◆ BOOST_AUTO_TEST_CASE() [7/9]

BOOST_AUTO_TEST_CASE ( SharedLineInTheMiddleIsContext )

Definition at line 143 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), KIGIT::BuildTextDiff(), left, and right.

◆ BOOST_AUTO_TEST_CASE() [8/9]

BOOST_AUTO_TEST_CASE ( SplitHandlesLineEndings )

Definition at line 88 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), empty(), and KIGIT::SplitTextLines().

◆ BOOST_AUTO_TEST_CASE() [9/9]

BOOST_AUTO_TEST_CASE ( TallNarrowTableFindsSharedLine )

Definition at line 112 of file test_text_diff.cpp.

References BOOST_CHECK_EQUAL(), and KIGIT::BuildTextDiff().

◆ render()

static wxString render ( const std::vector< TEXT_DIFF_LINE > & aLines)
static