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

Test suite for SYMBOL_LIBRARY_MANAGER object. More...

Go to the source code of this file.

Classes

class  SYMBOL_LIBRARY_MANAGER_TEST_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (SymbolBuffer)
 Test the SYMBOL_BUFFER object.
 
 BOOST_AUTO_TEST_CASE (LibBuffer)
 Test the LIB_BUFFER object.
 
 BOOST_AUTO_TEST_CASE (NewSymbolCreation)
 Test new symbol creation routines.
 
 BOOST_AUTO_TEST_CASE (DeletedSymbolsAreRemovedFromFile)
 Test that LIB_BUFFER correctly deletes symbols from the library file when saved.
 

Detailed Description

Test suite for SYMBOL_LIBRARY_MANAGER object.

Definition in file test_symbol_library_manager.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( DeletedSymbolsAreRemovedFromFile )

Test that LIB_BUFFER correctly deletes symbols from the library file when saved.

This test verifies the fix for the bug where deleting a derived symbol from the symbol editor tree and saving would result in the symbol reappearing as a non-derived symbol when the library was reloaded. The root cause was that SaveBuffer only saved existing symbols but never called DeleteSymbol on the plugin for symbols in the m_deleted list.

Definition at line 232 of file test_symbol_library_manager.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), LIB_BUFFER::ClearDeletedBuffer(), LIB_BUFFER::CreateBuffer(), LIB_BUFFER::DeleteBuffer(), LIB_BUFFER::GetBuffer(), LIB_BUFFER::GetBuffers(), LIB_BUFFER::GetDeletedBuffers(), LIB_BUFFER::GetSymbol(), LIB_SYMBOL::IsDerived(), SCH_IO_KICAD_SEXPR::PropBuffering, LIB_BUFFER::SaveBuffer(), and LIB_SYMBOL::SetParent().

◆ BOOST_AUTO_TEST_CASE() [2/4]

◆ BOOST_AUTO_TEST_CASE() [3/4]

◆ BOOST_AUTO_TEST_CASE() [4/4]