39namespace fs = std::filesystem;
47 m_tempDir = fs::temp_directory_path() /
"kicad_project_local_settings_test";
60 fs::path projectDir =
m_tempDir / aProjectName;
61 fs::create_directories( projectDir );
63 fs::path prlPath = projectDir
67 std::ofstream prlFile( prlPath );
68 prlFile << aPrlContents;
71 std::string proContents = R
"({ "meta": { "filename": ")" + aProjectName + R"(.kicad_pro", "version": 3 } })";
73 fs::path proPath = projectDir / ( aProjectName + ".kicad_pro" );
76 std::ofstream proFile( proPath );
77 proFile << proContents;
96 std::string prlContent = R
"({
99 "active_layer_preset": "All Layers",
100 "auto_track_width": true,
101 "hidden_netclasses": [],
103 "high_contrast_mode": 0,
112 "selection_filter": {
117 "lockedItems": false,
126 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19,
127 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35,
130 "visible_layers": "fffffff_ffffffff",
131 "zone_display_mode": 0
134 "filename": "v8_project.kicad_prl",
143 writeAndLoadProject( "v8_project", prlContent, settingsManager );
149 "LAYER_FP_REFERENCES should be visible after migrating a V8 PRL" );
153 "LAYER_FP_VALUES should be visible after migrating a V8 PRL" );
157 "LAYER_FP_TEXT should be visible after migrating a V8 PRL" );
169 std::string prlContent = R
"({
171 "visible_items": [5, 17, 18],
172 "visible_layers": "fffffff_ffffffff"
175 "filename": "minimal_project.kicad_prl",
178 "project": { "files": [] }
182 writeAndLoadProject( "minimal_project", prlContent, settingsManager );
~PROJECT_LOCAL_SETTINGS_FIXTURE()
void writeAndLoadProject(const std::string &aProjectName, const std::string &aPrlContents, SETTINGS_MANAGER &aSettingsManager)
PROJECT_LOCAL_SETTINGS_FIXTURE()
The project local settings are things that are attached to a particular project, but also might be pa...
GAL_SET m_VisibleItems
The GAL layers (aka items) that are turned on for viewing (.
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Load a project or sets up a new project with a specified path.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
static const std::string ProjectLocalSettingsFileExtension
@ LAYER_FP_REFERENCES
Show footprints references (when texts are visible).
@ LAYER_ZONES
Control for copper zone opacity/visibility (color ignored).
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored).
@ LAYER_FP_VALUES
Show footprints values (when texts are visible).
#define GAL_LAYER_INDEX(x)
Use this macro to convert a GAL layer to a 0-indexed offset from LAYER_VIAS.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
BOOST_AUTO_TEST_CASE(V8PrlFootprintTextStaysVisible)
https://gitlab.com/kicad/code/kicad/-/issues/24193
Definition of file extensions used in Kicad.