KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_diff_types.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <diff_merge/kicad_diff_types.h>
#include <nlohmann/json.hpp>
#include <cstdio>
#include <unistd.h>

Go to the source code of this file.

Functions

static void roundTrip (const DIFF_VALUE &aValue)
 
 BOOST_AUTO_TEST_CASE (DiffValueNone)
 
 BOOST_AUTO_TEST_CASE (DiffValueBool)
 
 BOOST_AUTO_TEST_CASE (DiffValueInt)
 
 BOOST_AUTO_TEST_CASE (DiffValueInt64)
 
 BOOST_AUTO_TEST_CASE (DiffValueDouble)
 
 BOOST_AUTO_TEST_CASE (DiffValueString)
 
 BOOST_AUTO_TEST_CASE (DiffValueKiid)
 
 BOOST_AUTO_TEST_CASE (DiffValueVector2I)
 
 BOOST_AUTO_TEST_CASE (DiffValueBox2I)
 
 BOOST_AUTO_TEST_CASE (DiffValueColor)
 
 BOOST_AUTO_TEST_CASE (DiffValueLayer)
 
 BOOST_AUTO_TEST_CASE (DiffValueEnum)
 
 BOOST_AUTO_TEST_CASE (DiffValuePolygonSet)
 
 BOOST_AUTO_TEST_CASE (DiffValueEmptyPolygonSet)
 
 BOOST_AUTO_TEST_CASE (PropertyDeltaRoundTrip)
 
 BOOST_AUTO_TEST_CASE (PropertyDeltaRoundTripAsymmetric)
 
 BOOST_AUTO_TEST_CASE (ItemChangeRoundTrip)
 
 BOOST_AUTO_TEST_CASE (DocumentDiffRoundTrip)
 
 BOOST_AUTO_TEST_CASE (ProjectDiffEmpty)
 
 BOOST_AUTO_TEST_CASE (ProjectDiffJsonRoundTrip)
 
 BOOST_AUTO_TEST_CASE (ChangeKindStringRoundTrip)
 
 BOOST_AUTO_TEST_CASE (DeterministicJsonOutput)
 
 BOOST_AUTO_TEST_CASE (JsonEncodesUtf8NotLocale)
 
 BOOST_AUTO_TEST_CASE (WriteDiffOutputStdoutWritesContent)
 
 BOOST_AUTO_TEST_CASE (DiffValueInequalityAcrossPayloads)
 
 BOOST_AUTO_TEST_CASE (DiffValueInequalityAcrossTypes)
 
 BOOST_AUTO_TEST_CASE (DiffValueNoneEqualsNone)
 
 BOOST_AUTO_TEST_CASE (PropertyDeltaEqualityFieldSensitive)
 
 BOOST_AUTO_TEST_CASE (ItemChangeEqualityChildrenSensitive)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/29]

BOOST_AUTO_TEST_CASE ( ChangeKindStringRoundTrip )

◆ BOOST_AUTO_TEST_CASE() [2/29]

BOOST_AUTO_TEST_CASE ( DeterministicJsonOutput )

Definition at line 394 of file test_diff_types.cpp.

References BOOST_CHECK_EQUAL(), KICAD_DIFF::DIFF_VALUE::FromInt(), v1, and v2.

◆ BOOST_AUTO_TEST_CASE() [3/29]

BOOST_AUTO_TEST_CASE ( DiffValueBool )

Definition at line 66 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromBool(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [4/29]

BOOST_AUTO_TEST_CASE ( DiffValueBox2I )

Definition at line 122 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromBox2I(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [5/29]

BOOST_AUTO_TEST_CASE ( DiffValueColor )

Definition at line 129 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromColor(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [6/29]

BOOST_AUTO_TEST_CASE ( DiffValueDouble )

Definition at line 90 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromDouble(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [7/29]

BOOST_AUTO_TEST_CASE ( DiffValueEmptyPolygonSet )

Definition at line 172 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromPolygonSet(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [8/29]

BOOST_AUTO_TEST_CASE ( DiffValueEnum )

Definition at line 145 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromEnum(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [9/29]

◆ BOOST_AUTO_TEST_CASE() [10/29]

◆ BOOST_AUTO_TEST_CASE() [11/29]

BOOST_AUTO_TEST_CASE ( DiffValueInt )

Definition at line 74 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromInt(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [12/29]

BOOST_AUTO_TEST_CASE ( DiffValueInt64 )

Definition at line 82 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromInt64(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [13/29]

BOOST_AUTO_TEST_CASE ( DiffValueKiid )

◆ BOOST_AUTO_TEST_CASE() [14/29]

BOOST_AUTO_TEST_CASE ( DiffValueLayer )

◆ BOOST_AUTO_TEST_CASE() [15/29]

BOOST_AUTO_TEST_CASE ( DiffValueNone )

◆ BOOST_AUTO_TEST_CASE() [16/29]

BOOST_AUTO_TEST_CASE ( DiffValueNoneEqualsNone )

Definition at line 506 of file test_diff_types.cpp.

◆ BOOST_AUTO_TEST_CASE() [17/29]

◆ BOOST_AUTO_TEST_CASE() [18/29]

BOOST_AUTO_TEST_CASE ( DiffValueString )

Definition at line 98 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromString(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [19/29]

BOOST_AUTO_TEST_CASE ( DiffValueVector2I )

Definition at line 114 of file test_diff_types.cpp.

References KICAD_DIFF::DIFF_VALUE::FromVector2I(), and roundTrip().

◆ BOOST_AUTO_TEST_CASE() [20/29]

◆ BOOST_AUTO_TEST_CASE() [21/29]

◆ BOOST_AUTO_TEST_CASE() [22/29]

◆ BOOST_AUTO_TEST_CASE() [23/29]

◆ BOOST_AUTO_TEST_CASE() [24/29]

◆ BOOST_AUTO_TEST_CASE() [25/29]

◆ BOOST_AUTO_TEST_CASE() [26/29]

BOOST_AUTO_TEST_CASE ( PropertyDeltaEqualityFieldSensitive )

◆ BOOST_AUTO_TEST_CASE() [27/29]

◆ BOOST_AUTO_TEST_CASE() [28/29]

◆ BOOST_AUTO_TEST_CASE() [29/29]

BOOST_AUTO_TEST_CASE ( WriteDiffOutputStdoutWritesContent )

◆ roundTrip()