Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
eepicgeom_test.cc File Reference

Comprehensive test suite for eepicgeom.H - EEPIC LaTeX drawing utilities. More...

#include <gtest/gtest.h>
#include <sstream>
#include <cmath>
#include <eepicgeom.H>
Include dependency graph for eepicgeom_test.cc:

Go to the source code of this file.

Classes

class  EepicPlaneTest
 
class  EepicPlaneWithObjectsTest
 
class  ExtremePointsTest
 
class  SegmentVariantsTest
 
class  ArrowEdgeCaseTest
 
class  PolygonVariantsTest
 
class  EllipseVariantsTest
 
class  TextVariantsTest
 
class  RegularPolygonTest
 
class  EepicOutputFormatTest
 
class  SquarizeModeTest
 
class  CartesianAxisTest
 
class  CoordinateTransformTest
 
class  ThickVariantsTest
 
class  ThickPolygonVariantsTest
 
class  EdgeCaseTest
 

Functions

bool approx_equal (double a, double b, double tol=EPSILON)
 
 TEST_F (EepicPlaneTest, DefaultConstruction)
 
 TEST_F (EepicPlaneTest, ConstructionWithOffset)
 
 TEST_F (EepicPlaneTest, ResolutionSettings)
 
 TEST_F (EepicPlaneTest, ShadeThicknessSettings)
 
 TEST_F (EepicPlaneTest, ZoomPositiveFactor)
 
 TEST_F (EepicPlaneTest, ZoomFractionalFactor)
 
 TEST_F (EepicPlaneTest, ZoomInvalidFactor)
 
 TEST_F (EepicPlaneWithObjectsTest, AddSinglePoint)
 
 TEST_F (EepicPlaneWithObjectsTest, AddTwoPoints)
 
 TEST_F (EepicPlaneWithObjectsTest, AddSegment)
 
 TEST_F (EepicPlaneWithObjectsTest, AddArrow)
 
 TEST_F (EepicPlaneWithObjectsTest, AddEllipse)
 
 TEST_F (EepicPlaneWithObjectsTest, AddPolygon)
 
 TEST_F (EepicPlaneWithObjectsTest, AddTriangle)
 
 TEST_F (EepicPlaneWithObjectsTest, AddText)
 
 TEST_F (EepicPlaneWithObjectsTest, MultipleObjects)
 
 TEST_F (ExtremePointsTest, SinglePointExtremes)
 
 TEST_F (ExtremePointsTest, SegmentExtremes)
 
 TEST_F (ExtremePointsTest, MultipleObjectsExtremes)
 
 TEST_F (SegmentVariantsTest, ThickSegment)
 
 TEST_F (SegmentVariantsTest, DottedSegment)
 
 TEST_F (SegmentVariantsTest, DashSegment)
 
 TEST_F (SegmentVariantsTest, DottedArrow)
 
 TEST_F (SegmentVariantsTest, DashArrow)
 
 TEST_F (ArrowEdgeCaseTest, DiagonalArrow)
 
 TEST_F (ArrowEdgeCaseTest, HorizontalArrow)
 
 TEST_F (ArrowEdgeCaseTest, NearHorizontalArrow)
 
 TEST_F (ArrowEdgeCaseTest, VerticalArrow)
 
 TEST_F (ArrowEdgeCaseTest, NearVerticalArrow)
 
 TEST_F (PolygonVariantsTest, ShadePolygon)
 
 TEST_F (PolygonVariantsTest, DottedPolygon)
 
 TEST_F (PolygonVariantsTest, DashPolygon)
 
 TEST_F (PolygonVariantsTest, PolygonWithPoints)
 
 TEST_F (PolygonVariantsTest, Spline)
 
 TEST_F (PolygonVariantsTest, SplineArrow)
 
 TEST_F (EllipseVariantsTest, NormalEllipse)
 
 TEST_F (EllipseVariantsTest, ThickEllipse)
 
 TEST_F (EllipseVariantsTest, ShadeEllipse)
 
 TEST_F (EllipseVariantsTest, CircularEllipse)
 
 TEST_F (TextVariantsTest, LeftText)
 
 TEST_F (TextVariantsTest, RightText)
 
 TEST_F (TextVariantsTest, CenterText)
 
 TEST_F (TextVariantsTest, TextWithSpecialCharacters)
 
 TEST_F (RegularPolygonTest, RegularTriangle)
 
 TEST_F (RegularPolygonTest, RegularSquare)
 
 TEST_F (RegularPolygonTest, RegularHexagon)
 
 TEST_F (EepicOutputFormatTest, UnitLengthSetting)
 
 TEST_F (EepicOutputFormatTest, FillTypeSetting)
 
 TEST_F (EepicOutputFormatTest, PictureEnvironment)
 
 TEST_F (EepicOutputFormatTest, ThinLinesReset)
 
 TEST_F (EepicOutputFormatTest, ExtremePointsComments)
 
 TEST_F (SquarizeModeTest, DrawWithSquarize)
 
 TEST_F (SquarizeModeTest, DrawWithoutSquarize)
 
 TEST_F (CartesianAxisTest, WithCartesianAxis)
 
 TEST_F (CoordinateTransformTest, PointString)
 
 TEST_F (CoordinateTransformTest, HGeomNumberToEepic)
 
 TEST_F (CoordinateTransformTest, VGeomNumberToEepic)
 
 TEST (EepicPolymorphismTest, PointInPlane)
 
 TEST (EepicPolymorphismTest, SegmentInPlane)
 
 TEST (EepicPolymorphismTest, EllipseInPlane)
 
 TEST_F (ThickVariantsTest, ThickDashSegment)
 
 TEST_F (ThickVariantsTest, ThickArrow)
 
 TEST_F (ThickVariantsTest, ThickDashArrow)
 
 TEST_F (ThickPolygonVariantsTest, ThickSpline)
 
 TEST_F (ThickPolygonVariantsTest, ThickDashSpline)
 
 TEST_F (ThickPolygonVariantsTest, ThickShadePolygon)
 
 TEST_F (EdgeCaseTest, VerySmallCoordinates)
 
 TEST_F (EdgeCaseTest, VeryLargeCoordinates)
 
 TEST_F (EdgeCaseTest, NegativeCoordinates)
 
 TEST_F (EdgeCaseTest, ZeroLengthSegment)
 
 TEST_F (EdgeCaseTest, SingleVertexPolygon)
 
 TEST_F (EdgeCaseTest, TwoVertexPolygon)
 
 TEST (MemoryTest, PlaneDestruction)
 
 TEST (MemoryTest, MultipleDrawCalls)
 
 TEST (MemoryTest, MultipleDrawCallsWithSegment)
 
 TEST (IntegrationTest, ComplexDiagram)
 
 TEST (IntegrationTest, GraphStyleDiagram)
 
int main (int argc, char **argv)
 

Variables

bool tiny_keys = false
 Global flag to enable tiny font size for keys/labels.
 
constexpr double EPSILON = 1e-6
 

Detailed Description

Comprehensive test suite for eepicgeom.H - EEPIC LaTeX drawing utilities.

Tests cover:

Definition in file eepicgeom_test.cc.

Function Documentation

◆ approx_equal()

bool approx_equal ( double  a,
double  b,
double  tol = EPSILON 
)

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1471 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST() [1/8]

◆ TEST() [2/8]

◆ TEST() [3/8]

◆ TEST() [4/8]

TEST ( IntegrationTest  ,
ComplexDiagram   
)

◆ TEST() [5/8]

TEST ( IntegrationTest  ,
GraphStyleDiagram   
)

◆ TEST() [6/8]

TEST ( MemoryTest  ,
MultipleDrawCalls   
)

◆ TEST() [7/8]

TEST ( MemoryTest  ,
MultipleDrawCallsWithSegment   
)

◆ TEST() [8/8]

TEST ( MemoryTest  ,
PlaneDestruction   
)

◆ TEST_F() [1/69]

TEST_F ( ArrowEdgeCaseTest  ,
DiagonalArrow   
)

◆ TEST_F() [2/69]

TEST_F ( ArrowEdgeCaseTest  ,
HorizontalArrow   
)

◆ TEST_F() [3/69]

TEST_F ( ArrowEdgeCaseTest  ,
NearHorizontalArrow   
)

◆ TEST_F() [4/69]

TEST_F ( ArrowEdgeCaseTest  ,
NearVerticalArrow   
)

◆ TEST_F() [5/69]

TEST_F ( ArrowEdgeCaseTest  ,
VerticalArrow   
)

◆ TEST_F() [6/69]

TEST_F ( CartesianAxisTest  ,
WithCartesianAxis   
)

◆ TEST_F() [7/69]

TEST_F ( CoordinateTransformTest  ,
HGeomNumberToEepic   
)

Definition at line 1034 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [8/69]

TEST_F ( CoordinateTransformTest  ,
PointString   
)

Definition at line 1023 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [9/69]

TEST_F ( CoordinateTransformTest  ,
VGeomNumberToEepic   
)

Definition at line 1043 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp(), and y.

◆ TEST_F() [10/69]

TEST_F ( EdgeCaseTest  ,
NegativeCoordinates   
)

◆ TEST_F() [11/69]

TEST_F ( EdgeCaseTest  ,
SingleVertexPolygon   
)

◆ TEST_F() [12/69]

TEST_F ( EdgeCaseTest  ,
TwoVertexPolygon   
)

◆ TEST_F() [13/69]

TEST_F ( EdgeCaseTest  ,
VeryLargeCoordinates   
)

◆ TEST_F() [14/69]

TEST_F ( EdgeCaseTest  ,
VerySmallCoordinates   
)

◆ TEST_F() [15/69]

TEST_F ( EdgeCaseTest  ,
ZeroLengthSegment   
)

◆ TEST_F() [16/69]

TEST_F ( EepicOutputFormatTest  ,
ExtremePointsComments   
)

◆ TEST_F() [17/69]

TEST_F ( EepicOutputFormatTest  ,
FillTypeSetting   
)

◆ TEST_F() [18/69]

TEST_F ( EepicOutputFormatTest  ,
PictureEnvironment   
)

◆ TEST_F() [19/69]

TEST_F ( EepicOutputFormatTest  ,
ThinLinesReset   
)

◆ TEST_F() [20/69]

TEST_F ( EepicOutputFormatTest  ,
UnitLengthSetting   
)

◆ TEST_F() [21/69]

TEST_F ( EepicPlaneTest  ,
ConstructionWithOffset   
)

Definition at line 92 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [22/69]

TEST_F ( EepicPlaneTest  ,
DefaultConstruction   
)

Definition at line 84 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [23/69]

TEST_F ( EepicPlaneTest  ,
ResolutionSettings   
)

Definition at line 100 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [24/69]

TEST_F ( EepicPlaneTest  ,
ShadeThicknessSettings   
)

Definition at line 109 of file eepicgeom_test.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [25/69]

TEST_F ( EepicPlaneTest  ,
ZoomFractionalFactor   
)

◆ TEST_F() [26/69]

TEST_F ( EepicPlaneTest  ,
ZoomInvalidFactor   
)

◆ TEST_F() [27/69]

TEST_F ( EepicPlaneTest  ,
ZoomPositiveFactor   
)

◆ TEST_F() [28/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddArrow   
)

◆ TEST_F() [29/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddEllipse   
)

◆ TEST_F() [30/69]

◆ TEST_F() [31/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddSegment   
)

◆ TEST_F() [32/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddSinglePoint   
)

◆ TEST_F() [33/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddText   
)

◆ TEST_F() [34/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddTriangle   
)

◆ TEST_F() [35/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
AddTwoPoints   
)

◆ TEST_F() [36/69]

TEST_F ( EepicPlaneWithObjectsTest  ,
MultipleObjects   
)

◆ TEST_F() [37/69]

TEST_F ( EllipseVariantsTest  ,
CircularEllipse   
)

◆ TEST_F() [38/69]

TEST_F ( EllipseVariantsTest  ,
NormalEllipse   
)

◆ TEST_F() [39/69]

TEST_F ( EllipseVariantsTest  ,
ShadeEllipse   
)

◆ TEST_F() [40/69]

TEST_F ( EllipseVariantsTest  ,
ThickEllipse   
)

◆ TEST_F() [41/69]

TEST_F ( ExtremePointsTest  ,
MultipleObjectsExtremes   
)

◆ TEST_F() [42/69]

◆ TEST_F() [43/69]

TEST_F ( ExtremePointsTest  ,
SinglePointExtremes   
)

◆ TEST_F() [44/69]

TEST_F ( PolygonVariantsTest  ,
DashPolygon   
)

◆ TEST_F() [45/69]

TEST_F ( PolygonVariantsTest  ,
DottedPolygon   
)

◆ TEST_F() [46/69]

TEST_F ( PolygonVariantsTest  ,
PolygonWithPoints   
)

◆ TEST_F() [47/69]

TEST_F ( PolygonVariantsTest  ,
ShadePolygon   
)

◆ TEST_F() [48/69]

◆ TEST_F() [49/69]

TEST_F ( PolygonVariantsTest  ,
SplineArrow   
)

◆ TEST_F() [50/69]

TEST_F ( RegularPolygonTest  ,
RegularHexagon   
)

◆ TEST_F() [51/69]

TEST_F ( RegularPolygonTest  ,
RegularSquare   
)

◆ TEST_F() [52/69]

TEST_F ( RegularPolygonTest  ,
RegularTriangle   
)

◆ TEST_F() [53/69]

TEST_F ( SegmentVariantsTest  ,
DashArrow   
)

◆ TEST_F() [54/69]

TEST_F ( SegmentVariantsTest  ,
DashSegment   
)

◆ TEST_F() [55/69]

TEST_F ( SegmentVariantsTest  ,
DottedArrow   
)

◆ TEST_F() [56/69]

TEST_F ( SegmentVariantsTest  ,
DottedSegment   
)

◆ TEST_F() [57/69]

TEST_F ( SegmentVariantsTest  ,
ThickSegment   
)

◆ TEST_F() [58/69]

TEST_F ( SquarizeModeTest  ,
DrawWithoutSquarize   
)

◆ TEST_F() [59/69]

TEST_F ( SquarizeModeTest  ,
DrawWithSquarize   
)

◆ TEST_F() [60/69]

TEST_F ( TextVariantsTest  ,
CenterText   
)

◆ TEST_F() [61/69]

TEST_F ( TextVariantsTest  ,
LeftText   
)

◆ TEST_F() [62/69]

TEST_F ( TextVariantsTest  ,
RightText   
)

◆ TEST_F() [63/69]

TEST_F ( TextVariantsTest  ,
TextWithSpecialCharacters   
)

◆ TEST_F() [64/69]

TEST_F ( ThickPolygonVariantsTest  ,
ThickDashSpline   
)

◆ TEST_F() [65/69]

TEST_F ( ThickPolygonVariantsTest  ,
ThickShadePolygon   
)

◆ TEST_F() [66/69]

TEST_F ( ThickPolygonVariantsTest  ,
ThickSpline   
)

◆ TEST_F() [67/69]

TEST_F ( ThickVariantsTest  ,
ThickArrow   
)

◆ TEST_F() [68/69]

TEST_F ( ThickVariantsTest  ,
ThickDashArrow   
)

◆ TEST_F() [69/69]

TEST_F ( ThickVariantsTest  ,
ThickDashSegment   
)

Variable Documentation

◆ EPSILON

constexpr double EPSILON = 1e-6
constexpr

Definition at line 59 of file eepicgeom_test.cc.

Referenced by TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ tiny_keys

bool tiny_keys = false

Global flag to enable tiny font size for keys/labels.

When set to true, text labels will be rendered using LaTeX's \tiny font size modifier. Useful for dense diagrams with many labels.

Definition at line 54 of file eepicgeom_test.cc.