KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_line_ending.cpp File Reference
#include <base_units.h>
#include <line_ending.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <richio.h>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

static std::string formatLineEnding (LINE_ENDING_STYLE aStyle, int aLength=0, int aWidth=0)
 
static void checkDoesNotWriteFill (const std::string &aFormatted)
 
static void checkVectorEqual (const VECTOR2I &aActual, const VECTOR2I &aExpected)
 
static void checkEffectiveSize (int aLength, int aWidth, const VECTOR2I &aExpected)
 
static void checkShortenDepth (LINE_ENDING_STYLE aStyle, int aLength, int aWidth, int aStrokeWidth, int aExpected)
 
static void checkCurveOrientationDepth (LINE_ENDING_STYLE aStyle, int aLength, int aWidth, int aStrokeWidth, int aExpected)
 
 BOOST_AUTO_TEST_CASE (FormatDoesNotWriteFill)
 
 BOOST_AUTO_TEST_CASE (FormatPreservesExplicitEqualLengthWidth)
 
 BOOST_AUTO_TEST_CASE (GetEffectiveSizeUsesConfiguredAndAutoAxes)
 
 BOOST_AUTO_TEST_CASE (GetShapesProducesStyleGeometry)
 
 BOOST_AUTO_TEST_CASE (OpenArrowOrientationUsesVisualLength)
 
 BOOST_AUTO_TEST_CASE (GetShortenDepthUsesEndpointPolicy)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( FormatDoesNotWriteFill )

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( FormatPreservesExplicitEqualLengthWidth )

Definition at line 112 of file test_line_ending.cpp.

References ARROW, BOOST_CHECK_EQUAL(), formatLineEnding(), pcbIUScale, and SQUARE.

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( GetEffectiveSizeUsesConfiguredAndAutoAxes )

Definition at line 129 of file test_line_ending.cpp.

References checkEffectiveSize().

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( GetShapesProducesStyleGeometry )

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( GetShortenDepthUsesEndpointPolicy )

Definition at line 194 of file test_line_ending.cpp.

References ARROW, ARROW_OPEN, checkShortenDepth(), CIRCLE, NONE, and SQUARE.

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( OpenArrowOrientationUsesVisualLength )

◆ checkCurveOrientationDepth()

static void checkCurveOrientationDepth ( LINE_ENDING_STYLE aStyle,
int aLength,
int aWidth,
int aStrokeWidth,
int aExpected )
static

◆ checkDoesNotWriteFill()

static void checkDoesNotWriteFill ( const std::string & aFormatted)
static

Definition at line 48 of file test_line_ending.cpp.

References BOOST_CHECK_EQUAL().

Referenced by BOOST_AUTO_TEST_CASE().

◆ checkEffectiveSize()

static void checkEffectiveSize ( int aLength,
int aWidth,
const VECTOR2I & aExpected )
static

Definition at line 61 of file test_line_ending.cpp.

References ARROW, checkVectorEqual(), and LINE_ENDING::GetEffectiveSize().

Referenced by BOOST_AUTO_TEST_CASE().

◆ checkShortenDepth()

static void checkShortenDepth ( LINE_ENDING_STYLE aStyle,
int aLength,
int aWidth,
int aStrokeWidth,
int aExpected )
static

◆ checkVectorEqual()

static void checkVectorEqual ( const VECTOR2I & aActual,
const VECTOR2I & aExpected )
static

◆ formatLineEnding()

static std::string formatLineEnding ( LINE_ENDING_STYLE aStyle,
int aLength = 0,
int aWidth = 0 )
static