|
KiCad PCB EDA Suite
|
#include "qa_utils/wx_utils/unit_test_utils.h"#include <boost/test/unit_test.hpp>#include <qa_utils/file_utils.h>#include <drawing_sheet/ds_data_model.h>#include <ki_exception.h>#include <kiplatform/io.h>#include <richio.h>#include <wx/dir.h>#include <wx/ffile.h>#include <wx/filefn.h>#include <wx/filename.h>#include <string>#include <sys/stat.h>#include <sys/types.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (PrettifiedFormatter_HappyPath) | |
| BOOST_AUTO_TEST_CASE (PrettifiedFormatter_UnwindingPreservesOriginal) | |
| BOOST_AUTO_TEST_CASE (PrettifiedFormatter_DestructorDiscardsWithoutExplicitFinish) | |
| BOOST_AUTO_TEST_CASE (FileFormatter_UnwindingPreservesOriginal) | |
| BOOST_AUTO_TEST_CASE (FileFormatter_DestructorDiscardsWithoutExplicitFinish) | |
| BOOST_AUTO_TEST_CASE (AtomicWriteFile_HappyPath) | |
| BOOST_AUTO_TEST_CASE (AtomicWriteFile_OverwritePreservesOriginalOnFailure) | |
| BOOST_AUTO_TEST_CASE (PrettifiedFormatter_ExplicitFinishThrowsOnCommitFailure) | |
| BOOST_AUTO_TEST_CASE (FileFormatter_ExplicitFinishThrowsOnCommitFailure) | |
| BOOST_AUTO_TEST_CASE (Formatter_SecondFinishIsACallerError) | |
| BOOST_AUTO_TEST_CASE (DrawingSheetSave_PropagatesCommitFailure) | |
| BOOST_AUTO_TEST_CASE (PrettifiedFormatter_DestructorDiscardsWhenTargetIsDirectory) | |
| BOOST_AUTO_TEST_CASE (PrettifiedFormatter_CreatesNewTarget) | |
| BOOST_AUTO_TEST_CASE (AtomicWriteFile_PreservesPosixMode) | |
| BOOST_AUTO_TEST_CASE (AtomicWriteFile_FollowsSymlinkTarget) | |
| BOOST_AUTO_TEST_CASE (AtomicWriteFile_FailedRenameRestoresTargetMode) | |
| BOOST_AUTO_TEST_CASE | ( | AtomicWriteFile_FailedRenameRestoresTargetMode | ) |
Definition at line 443 of file test_atomic_save.cpp.
References KIPLATFORM::IO::AtomicWriteFile(), BOOST_REQUIRE(), KI_TEST::LoadStringData(), and KI_TEST::SCOPED_TEMP_DIR::PathStr().
| BOOST_AUTO_TEST_CASE | ( | AtomicWriteFile_FollowsSymlinkTarget | ) |
Definition at line 415 of file test_atomic_save.cpp.
References KIPLATFORM::IO::AtomicWriteFile(), BOOST_REQUIRE(), KI_TEST::LoadStringData(), and KI_TEST::SCOPED_TEMP_DIR::PathStr().
| BOOST_AUTO_TEST_CASE | ( | AtomicWriteFile_HappyPath | ) |
Definition at line 182 of file test_atomic_save.cpp.
References KIPLATFORM::IO::AtomicWriteFile(), BOOST_REQUIRE(), KI_TEST::LoadStringData(), and KI_TEST::SCOPED_TEMP_DIR::PathStr().
| BOOST_AUTO_TEST_CASE | ( | AtomicWriteFile_OverwritePreservesOriginalOnFailure | ) |
Definition at line 198 of file test_atomic_save.cpp.
References KIPLATFORM::IO::AtomicWriteFile(), BOOST_REQUIRE(), KI_TEST::LoadStringData(), and KI_TEST::SCOPED_TEMP_DIR::PathStr().
| BOOST_AUTO_TEST_CASE | ( | AtomicWriteFile_PreservesPosixMode | ) |
Definition at line 390 of file test_atomic_save.cpp.
References KIPLATFORM::IO::AtomicWriteFile(), BOOST_REQUIRE(), KI_TEST::LoadStringData(), and KI_TEST::SCOPED_TEMP_DIR::PathStr().
| BOOST_AUTO_TEST_CASE | ( | DrawingSheetSave_PropagatesCommitFailure | ) |
Definition at line 327 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), DS_DATA_MODEL::GetTheInstance(), model, and KI_TEST::SCOPED_TEMP_DIR::PathStr().
| BOOST_AUTO_TEST_CASE | ( | FileFormatter_DestructorDiscardsWithoutExplicitFinish | ) |
Definition at line 164 of file test_atomic_save.cpp.
References KI_TEST::LoadStringData(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | FileFormatter_ExplicitFinishThrowsOnCommitFailure | ) |
Definition at line 248 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), FILE_OUTPUTFORMATTER::Finish(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | FileFormatter_UnwindingPreservesOriginal | ) |
Definition at line 141 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), KI_TEST::LoadStringData(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | Formatter_SecondFinishIsACallerError | ) |
Definition at line 274 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), CHECK_WX_ASSERT, FILE_OUTPUTFORMATTER::Finish(), PRETTIFIED_FILE_OUTPUTFORMATTER::Finish(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | PrettifiedFormatter_CreatesNewTarget | ) |
Definition at line 368 of file test_atomic_save.cpp.
References actual, BOOST_REQUIRE(), PRETTIFIED_FILE_OUTPUTFORMATTER::Finish(), KI_TEST::LoadStringData(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | PrettifiedFormatter_DestructorDiscardsWhenTargetIsDirectory | ) |
Definition at line 344 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), KI_TEST::SCOPED_COUNTING_WXLOG::GetCount(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | PrettifiedFormatter_DestructorDiscardsWithoutExplicitFinish | ) |
Definition at line 122 of file test_atomic_save.cpp.
References KI_TEST::LoadStringData(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | PrettifiedFormatter_ExplicitFinishThrowsOnCommitFailure | ) |
Definition at line 221 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), PRETTIFIED_FILE_OUTPUTFORMATTER::Finish(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | PrettifiedFormatter_HappyPath | ) |
Definition at line 76 of file test_atomic_save.cpp.
References actual, BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), PRETTIFIED_FILE_OUTPUTFORMATTER::Finish(), KI_TEST::LoadStringData(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().
| BOOST_AUTO_TEST_CASE | ( | PrettifiedFormatter_UnwindingPreservesOriginal | ) |
Definition at line 95 of file test_atomic_save.cpp.
References BOOST_REQUIRE(), KI_TEST::LoadStringData(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), and OUTPUTFORMATTER::Print().