@@ -29,7 +29,7 @@ namespace cura
2929/* !
3030 * Fixture that provides a basis for testing wall computation.
3131 */
32- class FffGcodeWriterTest : public testing ::Test
32+ class DISABLED_FffGcodeWriterTest : public testing ::Test
3333{
3434public:
3535 Settings* settings;
@@ -39,7 +39,7 @@ class FffGcodeWriterTest : public testing::Test
3939 // Square that fits wholly inside the above square
4040 Shape inner_square;
4141
42- FffGcodeWriterTest ()
42+ DISABLED_FffGcodeWriterTest ()
4343 : fff_gcode_writer()
4444 {
4545 outer_square.emplace_back ();
@@ -68,7 +68,8 @@ class FffGcodeWriterTest : public testing::Test
6868 std::ifstream file (path);
6969
7070 std::string line;
71- while (std::getline (file, line)) {
71+ while (std::getline (file, line))
72+ {
7273 size_t pos = line.find (' =' );
7374 std::string key = line.substr (0 , pos);
7475 std::string value = line.substr (pos + 1 );
@@ -97,7 +98,7 @@ class FffGcodeWriterTest : public testing::Test
9798 }
9899};
99100
100- TEST_F (FffGcodeWriterTest , SurfaceGetsExtraInfillLinesUnderIt)
101+ TEST_F (DISABLED_FffGcodeWriterTest , SurfaceGetsExtraInfillLinesUnderIt)
101102{
102103 // SETUP
103104 SliceDataStorage* storage = setUpStorage ();
@@ -114,10 +115,10 @@ TEST_F(FffGcodeWriterTest, SurfaceGetsExtraInfillLinesUnderIt)
114115
115116 Mesh mesh (*settings);
116117
117- LayerPlan gcode_layer (*storage, 100 , 10000 , 100 , 0 , {fan_settings}, 20 , 10 , 5000 );
118+ LayerPlan gcode_layer (*storage, 100 , 10000 , 100 , 0 , { fan_settings }, 20 , 10 , 5000 );
118119 SliceMeshStorage mesh_storage (&mesh, 200 );
119120 size_t extruder_nr = 0 ;
120- MeshPathConfigs mesh_config (mesh_storage, 10 , 100 , {0.5 });
121+ MeshPathConfigs mesh_config (mesh_storage, 10 , 100 , { 0.5 });
121122 SliceLayerPart part;
122123
123124 part.infill_area_per_combine_per_density = { { outer_square } };
@@ -134,14 +135,7 @@ TEST_F(FffGcodeWriterTest, SurfaceGetsExtraInfillLinesUnderIt)
134135 // We're expecting the sparse infill on layer 100 to have
135136 // some lines to support the corners of the layer above.
136137 // But we arent wanting the whole area densely supported.
137- fff_gcode_writer.processSingleLayerInfill (
138- *storage,
139- gcode_layer,
140- mesh_storage,
141- extruder_nr,
142- mesh_config,
143- part
144- );
138+ fff_gcode_writer.processSingleLayerInfill (*storage, gcode_layer, mesh_storage, extruder_nr, mesh_config, part);
145139
146140 /* Useful code if you're debugging this test. Also add this test as a friend in GCodeExport.h
147141 GCodeExport gcode_export;
@@ -152,14 +146,18 @@ TEST_F(FffGcodeWriterTest, SurfaceGetsExtraInfillLinesUnderIt)
152146 */
153147
154148 // Test helper
155- auto checkPointIsPassed = [&](Point2LL p, coord_t margin)-> bool {
149+ auto checkPointIsPassed = [&](Point2LL p, coord_t margin) -> bool
150+ {
156151 Point2LL last;
157- for (const auto & path:gcode_layer.extruder_plans_ [0 ].paths_ ) {
158- for (const auto & point: path.points ) {
152+ for (const auto & path : gcode_layer.extruder_plans_ [0 ].paths_ )
153+ {
154+ for (const auto & point : path.points )
155+ {
159156 Point2LL closest_here = LinearAlg2D::getClosestOnLineSegment (p, point.toPoint2LL (), last);
160157 int64_t dist = vSize2 (p - closest_here);
161158
162- if (dist<margin*margin) return true ;
159+ if (dist < margin * margin)
160+ return true ;
163161
164162 last = point.toPoint2LL ();
165163 }
@@ -168,8 +166,8 @@ TEST_F(FffGcodeWriterTest, SurfaceGetsExtraInfillLinesUnderIt)
168166 };
169167
170168 // Check the results
171- for (auto poly: inner_square)
172- for (auto point: poly)
169+ for (auto poly : inner_square)
170+ for (auto point : poly)
173171 EXPECT_TRUE (checkPointIsPassed (point, MM2INT (0.3 ))) << " The corners of this square need an infill line under them so they dont droop down!" ;
174172
175173 int ctr = 0 ;
0 commit comments