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

Test suite for SEXPR::PARSER. More...

Go to the source code of this file.

Classes

class  TEST_SEXPR_PARSER_FIXTURE
 
struct  TEST_SEXPR_CASE
 Collection of test cases for use when multiple cases can be handled in the same test case. More...
 
struct  TEST_SEXPR_ROUNDTRIPPING
 Test for roundtripping (valid) s-expression back to strings. More...
 

Functions

 BOOST_AUTO_TEST_CASE (Empty)
 Declare the test suite.
 
 BOOST_AUTO_TEST_CASE (Words)
 This comes out as a single symbol.
 
 BOOST_AUTO_TEST_CASE (ParseExceptions)
 This comes out as a single symbol.
 
 BOOST_AUTO_TEST_CASE (EmptyParens)
 This comes out as an empty list.
 
 BOOST_AUTO_TEST_CASE (SimpleSymbol)
 Single symbol in parens.
 
 BOOST_AUTO_TEST_CASE (SymbolString)
 Test several atoms in a list, including nested lists.
 
 BOOST_AUTO_TEST_CASE (StringRoundtrip)
 

Detailed Description

Test suite for SEXPR::PARSER.

Definition in file test_sexpr_parser.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

BOOST_AUTO_TEST_CASE ( Empty  )

Declare the test suite.

Cases that result in no s-expr object

Definition at line 70 of file test_sexpr_parser.cpp.

References BOOST_TEST_CONTEXT.

◆ BOOST_AUTO_TEST_CASE() [2/7]

BOOST_AUTO_TEST_CASE ( EmptyParens  )

This comes out as an empty list.

Definition at line 149 of file test_sexpr_parser.cpp.

References KI_TEST::SexprIsListOfLength().

◆ BOOST_AUTO_TEST_CASE() [3/7]

BOOST_AUTO_TEST_CASE ( ParseExceptions  )

This comes out as a single symbol.

Definition at line 108 of file test_sexpr_parser.cpp.

References BOOST_TEST_CONTEXT.

◆ BOOST_AUTO_TEST_CASE() [4/7]

BOOST_AUTO_TEST_CASE ( SimpleSymbol  )

Single symbol in parens.

Definition at line 161 of file test_sexpr_parser.cpp.

References SEXPR::SEXPR::GetChild(), KI_TEST::SexprIsListOfLength(), and KI_TEST::SexprIsSymbolWithValue().

◆ BOOST_AUTO_TEST_CASE() [5/7]

BOOST_AUTO_TEST_CASE ( StringRoundtrip  )

Definition at line 210 of file test_sexpr_parser.cpp.

References BOOST_TEST_CONTEXT, and KI_TEST::SexprConvertsToString().

◆ BOOST_AUTO_TEST_CASE() [6/7]

BOOST_AUTO_TEST_CASE ( SymbolString  )

◆ BOOST_AUTO_TEST_CASE() [7/7]

BOOST_AUTO_TEST_CASE ( Words  )

This comes out as a single symbol.

Definition at line 96 of file test_sexpr_parser.cpp.

References KI_TEST::SexprIsSymbolWithValue().