KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_wide_int.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <cstdint>
#include <limits>
#include <random>
#include <geometry/geometry_predicates.h>
#include <math/wide_int.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (CrossWideKnownValues)
 
 BOOST_AUTO_TEST_CASE (Int64Extremes)
 
 BOOST_AUTO_TEST_CASE (OrientationSignBeyondDoublePrecision)
 
 BOOST_AUTO_TEST_CASE (InCircleDelaunayLegalExact)
 
 BOOST_AUTO_TEST_CASE (WordsToDoubleBorrowAndRounding)
 
 BOOST_AUTO_TEST_CASE (RandomAgainstLongDouble)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( CrossWideKnownValues )

Definition at line 40 of file test_wide_int.cpp.

References BOOST_CHECK_EQUAL(), CrossWide(), DotWide(), sign(), and ToDouble().

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( InCircleDelaunayLegalExact )

Definition at line 86 of file test_wide_int.cpp.

References KIGEOM::InCircleDelaunayLegal().

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( Int64Extremes )

Definition at line 62 of file test_wide_int.cpp.

References BOOST_CHECK_EQUAL(), CrossWide(), DotWide(), and ToDouble().

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( OrientationSignBeyondDoublePrecision )

Definition at line 74 of file test_wide_int.cpp.

References BOOST_CHECK_EQUAL(), and KIGEOM::OrientationSign().

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( RandomAgainstLongDouble )

Definition at line 122 of file test_wide_int.cpp.

References CrossWide(), DotWide(), rng, ToDouble(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( WordsToDoubleBorrowAndRounding )

Definition at line 101 of file test_wide_int.cpp.

References BOOST_CHECK_EQUAL(), up, and KIGEOM_WIDE::WordsToDouble().