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

Test suite for general string functions. More...

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (TrailingInt)
 Declare the test suite.
 
 BOOST_AUTO_TEST_CASE (NaturalNumberCompare)
 Test the StrNumCmp method.
 
 BOOST_AUTO_TEST_CASE (ValueCompare)
 
 BOOST_AUTO_TEST_CASE (ValueCompareAlphanumericIdentifiers)
 
 BOOST_AUTO_TEST_CASE (Double2Str)
 Test the GetTrailingInt method.
 
 BOOST_AUTO_TEST_CASE (HTMLEscape)
 Test EscapeHTML and UnescapeHTML methods.
 
 BOOST_AUTO_TEST_CASE (VariantNameSort)
 Test SortVariantNames().
 
 BOOST_AUTO_TEST_CASE (FormatTrimmedDecimalKeepsIntegerDigits)
 Test FormatTrimmedDecimal().
 
static wxString oldTrimLoop (double aVal, int aPrecision)
 
 BOOST_AUTO_TEST_CASE (FormatTrimmedDecimalMatchesOldTrimLoop)
 

Detailed Description

Test suite for general string functions.

Definition in file test_kicad_string.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/9]

BOOST_AUTO_TEST_CASE ( Double2Str )

Test the GetTrailingInt method.

Definition at line 160 of file test_kicad_string.cpp.

References BOOST_CHECK_EQUAL(), FormatDouble2Str(), and UIDouble2Str().

◆ BOOST_AUTO_TEST_CASE() [2/9]

BOOST_AUTO_TEST_CASE ( FormatTrimmedDecimalKeepsIntegerDigits )

◆ BOOST_AUTO_TEST_CASE() [3/9]

BOOST_AUTO_TEST_CASE ( FormatTrimmedDecimalMatchesOldTrimLoop )

Definition at line 258 of file test_kicad_string.cpp.

References BOOST_CHECK_EQUAL(), FormatTrimmedDecimal(), and oldTrimLoop().

◆ BOOST_AUTO_TEST_CASE() [4/9]

BOOST_AUTO_TEST_CASE ( HTMLEscape )

Test EscapeHTML and UnescapeHTML methods.

Definition at line 186 of file test_kicad_string.cpp.

References BOOST_CHECK_EQUAL(), EscapeHTML(), and UnescapeHTML().

◆ BOOST_AUTO_TEST_CASE() [5/9]

BOOST_AUTO_TEST_CASE ( NaturalNumberCompare )

Test the StrNumCmp method.

Definition at line 62 of file test_kicad_string.cpp.

References StrNumCmp().

◆ BOOST_AUTO_TEST_CASE() [6/9]

BOOST_AUTO_TEST_CASE ( TrailingInt )

Declare the test suite.

Test the GetTrailingInt method.

Definition at line 39 of file test_kicad_string.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), and GetTrailingInt().

◆ BOOST_AUTO_TEST_CASE() [7/9]

BOOST_AUTO_TEST_CASE ( ValueCompare )

Definition at line 115 of file test_kicad_string.cpp.

References ValueStringCompare().

◆ BOOST_AUTO_TEST_CASE() [8/9]

BOOST_AUTO_TEST_CASE ( ValueCompareAlphanumericIdentifiers )

Definition at line 147 of file test_kicad_string.cpp.

References ValueStringCompare().

◆ BOOST_AUTO_TEST_CASE() [9/9]

BOOST_AUTO_TEST_CASE ( VariantNameSort )

◆ oldTrimLoop()

static wxString oldTrimLoop ( double aVal,
int aPrecision )
static

Definition at line 247 of file test_kicad_string.cpp.

Referenced by BOOST_AUTO_TEST_CASE().