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

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (Constexpr)
 Test suite for KiCad math code.
 
 BOOST_TEST (v2.Cross(v1)==1)
 
VECTOR2I v2 (5, -1)
 
 BOOST_TEST (v1.Resize(8)==VECTOR2I(6, 5))
 
 BOOST_TEST (v2.Resize(10)==VECTOR2I(10, -2))
 
 BOOST_TEST (v3.Resize(4)==VECTOR2I(-4, 2))
 
 BOOST_TEST (v4.Resize(1)==VECTOR2I(1, 1))
 
 BOOST_TEST (v5.Resize(100)==VECTOR2I(-71, -71))
 
 BOOST_AUTO_TEST_CASE (test_casting)
 

Variables

VECTOR2I v2 (1, 0)
 
VECTOR2I v3 (-2, 1)
 
VECTOR2I v4 (1, 1)
 
VECTOR2I v5 (-70, -70)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( Constexpr  )

Test suite for KiCad math code.

Declare the test suite

Definition at line 38 of file test_vector2.cpp.

References BOOST_TEST(), LexicographicalCompare(), LexicographicalMin(), and VECTOR2< T >::SquaredEuclideanNorm().

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( test_casting  )

Definition at line 109 of file test_vector2.cpp.

References VECTOR2< T >::x.

◆ BOOST_TEST() [1/6]

BOOST_TEST ( v1.  Resize8 = =VECTOR2I(6, 5))

◆ BOOST_TEST() [2/6]

BOOST_TEST ( v2.  Crossv1 = =1)

Referenced by BOOST_AUTO_TEST_CASE().

◆ BOOST_TEST() [3/6]

BOOST_TEST ( v2.  Resize10 = =VECTOR2I(10, -2))

◆ BOOST_TEST() [4/6]

BOOST_TEST ( v3.  Resize4 = =VECTOR2I(-4, 2))

◆ BOOST_TEST() [5/6]

BOOST_TEST ( v4.  Resize1 = =VECTOR2I(1, 1))

◆ BOOST_TEST() [6/6]

BOOST_TEST ( v5.  Resize100 = =VECTOR2I(-71, -71))

◆ v2()

VECTOR2I v2 ( ,
1 
)

Variable Documentation

◆ v2

◆ v3

◆ v4

◆ v5

VECTOR2I v5(-70, -70) ( 70,
70 
)