|
KiCad PCB EDA Suite
|
Test suite for WX_FILNAME. More...
#include <boost/test/tools/old/interface.hpp>#include <qa_utils/wx_utils/unit_test_utils.h>#include <wx_filename.h>#include <wx/arrstr.h>#include <string>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | WX_FILENAME_SPLIT_CASE |
| Declare the test suite. More... | |
Functions | |
| BOOST_AUTO_TEST_CASE (Split) | |
| Check the various split cases work correctly. | |
| BOOST_AUTO_TEST_CASE (SplitArchiveEntryName_RejectsTraversal) | |
| BOOST_AUTO_TEST_CASE (SplitArchiveEntryName_AcceptsRelativeNames) | |
| BOOST_AUTO_TEST_CASE (ResolveArchiveEntryPath_RejectsTraversal) | |
| BOOST_AUTO_TEST_CASE (ResolveArchiveEntryPath_StaysBelowDestination) | |
| BOOST_AUTO_TEST_CASE (IsSafeChildPath_RejectsTraversal) | |
| BOOST_AUTO_TEST_CASE (IsSafeChildPath_AcceptsSingleComponentNames) | |
Variables | |
| static const std::vector< WX_FILENAME_SPLIT_CASE > | split_cases |
| static const std::vector< wxString > | hostile_entry_names |
| static const std::vector< std::pair< wxString, wxString > > | benign_entry_names |
Test suite for WX_FILNAME.
Definition in file test_wx_filename.cpp.
| BOOST_AUTO_TEST_CASE | ( | IsSafeChildPath_AcceptsSingleComponentNames | ) |
Definition at line 265 of file test_wx_filename.cpp.
References BOOST_TEST_CONTEXT(), WX_FILENAME::IsSafeChildPath(), and name.
| BOOST_AUTO_TEST_CASE | ( | IsSafeChildPath_RejectsTraversal | ) |
Definition at line 236 of file test_wx_filename.cpp.
References BOOST_TEST_CONTEXT(), hostile_entry_names, WX_FILENAME::IsSafeChildPath(), and name.
| BOOST_AUTO_TEST_CASE | ( | ResolveArchiveEntryPath_RejectsTraversal | ) |
Definition at line 193 of file test_wx_filename.cpp.
References BOOST_TEST_CONTEXT(), hostile_entry_names, name, and WX_FILENAME::ResolveArchiveEntryPath().
| BOOST_AUTO_TEST_CASE | ( | ResolveArchiveEntryPath_StaysBelowDestination | ) |
Definition at line 209 of file test_wx_filename.cpp.
References benign_entry_names, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_CONTEXT(), expected, name, and WX_FILENAME::ResolveArchiveEntryPath().
| BOOST_AUTO_TEST_CASE | ( | Split | ) |
Check the various split cases work correctly.
Definition at line 113 of file test_wx_filename.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), WX_FILENAME::GetFullName(), WX_FILENAME::GetFullPath(), WX_FILENAME::GetName(), WX_FILENAME::GetPath(), and split_cases.
| BOOST_AUTO_TEST_CASE | ( | SplitArchiveEntryName_AcceptsRelativeNames | ) |
Definition at line 178 of file test_wx_filename.cpp.
References benign_entry_names, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_CONTEXT(), expected, name, and WX_FILENAME::SplitArchiveEntryName().
| BOOST_AUTO_TEST_CASE | ( | SplitArchiveEntryName_RejectsTraversal | ) |
Definition at line 164 of file test_wx_filename.cpp.
References BOOST_TEST_CONTEXT(), hostile_entry_names, name, and WX_FILENAME::SplitArchiveEntryName().
|
static |
Definition at line 153 of file test_wx_filename.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 134 of file test_wx_filename.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 58 of file test_wx_filename.cpp.
Referenced by BOOST_AUTO_TEST_CASE().