KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_block_drag_pick.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
21
22#include <board.h>
23#include <pcb_generator.h>
24#include <pcb_shape.h>
25#include <zone.h>
28#include <tool/edit_points.h>
32
33
34namespace
35{
36
37// A polygon generator with nothing behind it, enough for the capability and pick rules
38class TEST_POLY_GENERATOR : public PCB_GENERATOR_POLY
39{
40public:
41 TEST_POLY_GENERATOR( BOARD_ITEM* aParent, const wxString& aGeneratorType ) :
42 PCB_GENERATOR_POLY( aParent, F_Cu ),
43 m_testGeneratorType( aGeneratorType )
44 {
45 }
46
47 wxString GetGeneratorType() const override { return m_testGeneratorType; }
48
49 void EditStart( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_COMMIT* aCommit ) override {}
50 bool Update( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_COMMIT* aCommit ) override { return true; }
51 void EditFinish( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_COMMIT* aCommit ) override {}
52 void EditCancel( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_COMMIT* aCommit ) override {}
53 void Remove( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_COMMIT* aCommit ) override {}
54
55 wxString GetPluralName() const override { return wxT( "Test Generators" ); }
56 wxString GetCommitMessage() const override { return wxT( "Test Generator" ); }
57
58private:
59 wxString m_testGeneratorType;
60};
61
62
63std::shared_ptr<EDIT_POINTS> makeCollection( EDA_ITEM* aParent )
64{
65 std::shared_ptr<EDIT_POINTS> points = std::make_shared<EDIT_POINTS>( aParent );
66
67 points->AddPoint( VECTOR2I( 0, 0 ) );
68 points->AddPoint( VECTOR2I( 100, 0 ) );
69 points->AddPoint( VECTOR2I( 100, 100 ) );
70 points->AddLine( points->Point( 0 ), points->Point( 1 ) );
71
72 return points;
73}
74
75} // namespace
76
77
78BOOST_AUTO_TEST_SUITE( BlockDragPickTests )
79
80
81BOOST_AUTO_TEST_CASE( PickableFollowsCapabilityAndHandleKind )
82{
83 BOARD board;
84
85 ZONE* zone = new ZONE( &board );
86 PCB_SHAPE* poly = new PCB_SHAPE( &board, SHAPE_T::POLY );
87 PCB_SHAPE* arc = new PCB_SHAPE( &board, SHAPE_T::ARC );
88
89 board.Add( zone );
90 board.Add( poly );
91 board.Add( arc );
92
93 std::shared_ptr<EDIT_POINTS> zonePoints = makeCollection( zone );
94 std::shared_ptr<EDIT_POINTS> polyPoints = makeCollection( poly );
95 std::shared_ptr<EDIT_POINTS> arcPoints = makeCollection( arc );
96
97 // Corners of reshapeable items can be picked
98 BOOST_CHECK( BlockDragHandlePickable( *zonePoints, zonePoints->Point( 0 ) ) );
99 BOOST_CHECK( BlockDragHandlePickable( *polyPoints, polyPoints->Point( 2 ) ) );
100
101 // Edge handles can be picked on polygons and zones
102 BOOST_CHECK( BlockDragHandlePickable( *zonePoints, zonePoints->Line( 0 ) ) );
103 BOOST_CHECK( BlockDragHandlePickable( *polyPoints, polyPoints->Line( 0 ) ) );
104
105 // An item that only travels whole offers nothing to pick
106 BOOST_CHECK( !BlockDragHandlePickable( *arcPoints, arcPoints->Point( 0 ) ) );
107}
108
109
110// A via stitch is an outline like a zone, so its edges can be picked like a zone's. A
111// tuning pattern is carried whole and offers nothing to pick
112BOOST_AUTO_TEST_CASE( PolygonGeneratorEdgeIsPickableLikeAZone )
113{
114 BOARD board;
115
116 TEST_POLY_GENERATOR* stitch = new TEST_POLY_GENERATOR( &board, wxS( "via_stitch" ) );
117 TEST_POLY_GENERATOR* tuning = new TEST_POLY_GENERATOR( &board, wxS( "tuning_pattern" ) );
118 board.Add( stitch );
119 board.Add( tuning );
120
121 std::shared_ptr<EDIT_POINTS> stitchPoints = makeCollection( stitch );
122 std::shared_ptr<EDIT_POINTS> tuningPoints = makeCollection( tuning );
123
125 BOOST_CHECK( BlockDragHandlePickable( *stitchPoints, stitchPoints->Point( 0 ) ) );
126 BOOST_CHECK( BlockDragHandlePickable( *stitchPoints, stitchPoints->Line( 0 ) ) );
127
129 BOOST_CHECK( !BlockDragHandlePickable( *tuningPoints, tuningPoints->Point( 0 ) ) );
130}
131
132
133// An edge handle only means something on an outline that can take a new corner, so it is
134// pickable on a zone or a polygon and refused anywhere else. A rectangle's own behaviour
135// never offers one, and this is the rule that would refuse it if it did
136BOOST_AUTO_TEST_CASE( EdgeHandleIsOnlyPickableOnAnOutline )
137{
138 BOARD board;
139
140 PCB_SHAPE* rect = new PCB_SHAPE( &board, SHAPE_T::RECTANGLE );
141 PCB_SHAPE* segment = new PCB_SHAPE( &board, SHAPE_T::SEGMENT );
142
143 board.Add( rect );
144 board.Add( segment );
145
146 std::shared_ptr<EDIT_POINTS> rectPoints = makeCollection( rect );
147 std::shared_ptr<EDIT_POINTS> segmentPoints = makeCollection( segment );
148
151
152 BOOST_CHECK( BlockDragHandlePickable( *rectPoints, rectPoints->Point( 0 ) ) );
153 BOOST_CHECK( !BlockDragHandlePickable( *rectPoints, rectPoints->Line( 0 ) ) );
154 BOOST_CHECK( !BlockDragHandlePickable( *segmentPoints, segmentPoints->Line( 0 ) ) );
155}
156
157
158// A handle that rebuilds the whole shape reads the shape as the other picked handles have
159// already left it, so two rebuilds in one frame compound. This covers the rule alone, with the
160// flag set by hand, because the rectangle behaviour that sets it lives inside the point editor
161// and cannot be built here. EllipseCentreIsMarkedAndRefused below covers a real behaviour
162// setting it.
163BOOST_AUTO_TEST_CASE( HandleThatDrivesTheWholeShapeIsNotPickable )
164{
165 BOARD board;
166
167 PCB_SHAPE* rect = new PCB_SHAPE( &board, SHAPE_T::RECTANGLE );
168 board.Add( rect );
169
170 std::shared_ptr<EDIT_POINTS> points = makeCollection( rect );
171
173 BOOST_REQUIRE( BlockDragHandlePickable( *points, points->Point( 1 ) ) );
174
175 points->Point( 1 ).SetDrivesWholeShape();
176
177 BOOST_CHECK( !BlockDragHandlePickable( *points, points->Point( 1 ) ) );
178
179 // The handles beside it are untouched
180 BOOST_CHECK( BlockDragHandlePickable( *points, points->Point( 0 ) ) );
181 BOOST_CHECK( BlockDragHandlePickable( *points, points->Point( 2 ) ) );
182}
183
184
185// The ellipse behaviour marks its centre, so a block drag refuses it while the radius handles
186// stay pickable. This is the real handle set, not a flag set by hand.
187BOOST_AUTO_TEST_CASE( EllipseCentreIsMarkedAndRefused )
188{
189 BOARD board;
190
191 PCB_SHAPE* ellipse = new PCB_SHAPE( &board, SHAPE_T::ELLIPSE );
192 ellipse->SetEllipseCenter( VECTOR2I( 0, 0 ) );
193 ellipse->SetEllipseMajorRadius( 20000000 );
194 ellipse->SetEllipseMinorRadius( 12000000 );
195 board.Add( ellipse );
196
197 EDIT_POINTS points( ellipse );
198 EDA_ELLIPSE_POINT_EDIT_BEHAVIOR behavior( *ellipse );
199
200 behavior.MakePoints( points );
201
202 BOOST_REQUIRE_GE( points.PointsSize(), 3u );
204
205 // MakePoints() adds the centre, then the major end, then the minor end
206 const EDIT_POINT& centre = points.Point( 0 );
207 const EDIT_POINT& majorEnd = points.Point( 1 );
208 const EDIT_POINT& minorEnd = points.Point( 2 );
209
210 BOOST_CHECK( centre.DrivesWholeShape() );
211 BOOST_CHECK( !majorEnd.DrivesWholeShape() );
212 BOOST_CHECK( !minorEnd.DrivesWholeShape() );
213
214 BOOST_CHECK( !BlockDragHandlePickable( points, centre ) );
215 BOOST_CHECK( BlockDragHandlePickable( points, majorEnd ) );
216 BOOST_CHECK( BlockDragHandlePickable( points, minorEnd ) );
217}
218
219
220BOOST_AUTO_TEST_CASE( ConstrainedParentIsPickable )
221{
222 BOARD board;
223
224 PCB_SHAPE* segment = new PCB_SHAPE( &board, SHAPE_T::SEGMENT );
225 board.Add( segment );
226
228 constraint->AddMember( segment->m_Uuid, CONSTRAINT_ANCHOR::WHOLE );
229 board.Add( constraint );
230
231 std::shared_ptr<EDIT_POINTS> points = makeCollection( segment );
232
233 BOOST_CHECK( BlockDragHandlePickable( *points, points->Point( 0 ) ) );
234}
235
236
237BOOST_AUTO_TEST_CASE( PlainPickReplacesSet )
238{
239 BOARD board;
240 ZONE* zone = new ZONE( &board );
241 board.Add( zone );
242
243 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
244
245 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
246 std::optional<PCB_HANDLE_KEY> key1 = PCB_HANDLE_KEY::Make( *points, &points->Point( 1 ) );
247 std::optional<PCB_HANDLE_KEY> key2 = PCB_HANDLE_KEY::Make( *points, &points->Point( 2 ) );
248
249 BOOST_REQUIRE( key0 && key1 && key2 );
250
251 std::set<PCB_HANDLE_KEY> picked{ *key0, *key1 };
252
253 BlockDragApplyPick( picked, *key2, false );
254
255 BOOST_REQUIRE_EQUAL( picked.size(), 1 );
256 BOOST_CHECK( picked.count( *key2 ) == 1 );
257
258 // A plain click on an already picked handle leaves just that handle
259 picked = { *key0, *key1 };
260 BlockDragApplyPick( picked, *key1, false );
261
262 BOOST_REQUIRE_EQUAL( picked.size(), 1 );
263 BOOST_CHECK( picked.count( *key1 ) == 1 );
264}
265
266
267BOOST_AUTO_TEST_CASE( AccumulatingPickToggles )
268{
269 BOARD board;
270 ZONE* zone = new ZONE( &board );
271 board.Add( zone );
272
273 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
274
275 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
276 std::optional<PCB_HANDLE_KEY> key1 = PCB_HANDLE_KEY::Make( *points, &points->Point( 1 ) );
277
278 BOOST_REQUIRE( key0 && key1 );
279
280 std::set<PCB_HANDLE_KEY> picked;
281
282 BlockDragApplyPick( picked, *key0, true );
283 BlockDragApplyPick( picked, *key1, true );
284
285 BOOST_REQUIRE_EQUAL( picked.size(), 2 );
286
287 // Toggling one off leaves the rest alone
288 BlockDragApplyPick( picked, *key0, true );
289
290 BOOST_REQUIRE_EQUAL( picked.size(), 1 );
291 BOOST_CHECK( picked.count( *key1 ) == 1 );
292}
293
294
295BOOST_AUTO_TEST_CASE( LassoPickReplacesWithEnclosed )
296{
297 BOARD board;
298 ZONE* zone = new ZONE( &board );
299 board.Add( zone );
300
301 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
302
303 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
304 std::optional<PCB_HANDLE_KEY> key1 = PCB_HANDLE_KEY::Make( *points, &points->Point( 1 ) );
305 std::optional<PCB_HANDLE_KEY> key2 = PCB_HANDLE_KEY::Make( *points, &points->Point( 2 ) );
306
307 BOOST_REQUIRE( key0 && key1 && key2 );
308
309 std::set<PCB_HANDLE_KEY> picked{ *key2 };
310
311 // All three points sit inside this triangle's bounding box, so only a real polygon
312 // test can leave point 2 at (100,100) out. The hypotenuse runs along x + y = 180,
313 // and point 2 sums to 200 while points 0 and 1 sum to 0 and 100
314 SHAPE_LINE_CHAIN triangle( { VECTOR2I( -20, -20 ), VECTOR2I( 200, -20 ), VECTOR2I( -20, 200 ) }, true );
315
316 BlockDragLassoPick( { points.get() }, triangle, false, picked );
317
318 BOOST_REQUIRE_EQUAL( picked.size(), 2 );
319 BOOST_CHECK( picked.count( *key0 ) == 1 );
320 BOOST_CHECK( picked.count( *key1 ) == 1 );
321 BOOST_CHECK( picked.count( *key2 ) == 0 );
322}
323
324
325BOOST_AUTO_TEST_CASE( LassoPickAccumulateAdds )
326{
327 BOARD board;
328 ZONE* zone = new ZONE( &board );
329 board.Add( zone );
330
331 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
332
333 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
334 std::optional<PCB_HANDLE_KEY> key2 = PCB_HANDLE_KEY::Make( *points, &points->Point( 2 ) );
335
336 BOOST_REQUIRE( key0 && key2 );
337
338 std::set<PCB_HANDLE_KEY> picked{ *key2 };
339
340 BlockDragLassoPick( { points.get() }, BlockDragPickRect( VECTOR2I( -10, -10 ), VECTOR2I( 10, 10 ) ), true, picked );
341
342 BOOST_REQUIRE_EQUAL( picked.size(), 2 );
343 BOOST_CHECK( picked.count( *key0 ) == 1 );
344 BOOST_CHECK( picked.count( *key2 ) == 1 );
345
346 // Lassoing an already picked handle again leaves the set as it was
347 BlockDragLassoPick( { points.get() }, BlockDragPickRect( VECTOR2I( -10, -10 ), VECTOR2I( 10, 10 ) ), true, picked );
348
349 BOOST_REQUIRE_EQUAL( picked.size(), 2 );
350}
351
352
353BOOST_AUTO_TEST_CASE( LassoPickSkipsNonPickable )
354{
355 BOARD board;
356
357 ZONE* zone = new ZONE( &board );
358 PCB_SHAPE* arc = new PCB_SHAPE( &board, SHAPE_T::ARC );
359
360 board.Add( zone );
361 board.Add( arc );
362
363 std::shared_ptr<EDIT_POINTS> zonePoints = makeCollection( zone );
364 std::shared_ptr<EDIT_POINTS> arcPoints = makeCollection( arc );
365
366 std::set<PCB_HANDLE_KEY> picked;
367
368 BlockDragLassoPick( { zonePoints.get(), arcPoints.get() },
369 BlockDragPickRect( VECTOR2I( -10, -10 ), VECTOR2I( 200, 200 ) ), false, picked );
370
371 // All three zone corners, and nothing from the arc, which only travels whole
372 BOOST_REQUIRE_EQUAL( picked.size(), 3 );
373
374 for( const PCB_HANDLE_KEY& key : picked )
375 BOOST_CHECK( key.Parent() == zone->m_Uuid );
376}
377
378
379BOOST_AUTO_TEST_CASE( BoundaryHandleCountsAsEnclosed )
380{
381 BOARD board;
382 ZONE* zone = new ZONE( &board );
383 board.Add( zone );
384
385 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
386
387 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
388 std::optional<PCB_HANDLE_KEY> key1 = PCB_HANDLE_KEY::Make( *points, &points->Point( 1 ) );
389
390 BOOST_REQUIRE( key0 && key1 );
391
392 std::set<PCB_HANDLE_KEY> picked;
393
394 // The lasso's right edge runs right through point 1 at ( 100, 0 )
395 BlockDragLassoPick( { points.get() }, BlockDragPickRect( VECTOR2I( -10, -10 ), VECTOR2I( 100, 50 ) ), false,
396 picked );
397
398 BOOST_REQUIRE_EQUAL( picked.size(), 2 );
399 BOOST_CHECK( picked.count( *key0 ) == 1 );
400 BOOST_CHECK( picked.count( *key1 ) == 1 );
401}
402
403
404// A lasso picks corners only. One that surrounds a zone edge's midpoint handle but
405// neither of its corners picks nothing, because an edge follows its corners
406BOOST_AUTO_TEST_CASE( EnclosedLineMidpointPicksNothing )
407{
408 BOARD board;
409 ZONE* zone = new ZONE( &board );
410 board.Add( zone );
411
412 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
413
414 std::set<PCB_HANDLE_KEY> picked;
415
416 BlockDragLassoPick( { points.get() }, BlockDragPickRect( VECTOR2I( 40, -10 ), VECTOR2I( 60, 10 ) ), false, picked );
417
418 BOOST_CHECK( picked.empty() );
419}
420
421
422BOOST_AUTO_TEST_CASE( EmptyPlainLassoClearsSet )
423{
424 BOARD board;
425 ZONE* zone = new ZONE( &board );
426 board.Add( zone );
427
428 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
429
430 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
431
432 BOOST_REQUIRE( key0 );
433
434 std::set<PCB_HANDLE_KEY> picked{ *key0 };
435
436 BlockDragLassoPick( { points.get() }, BlockDragPickRect( VECTOR2I( 500, 500 ), VECTOR2I( 600, 600 ) ), false,
437 picked );
438
439 BOOST_CHECK( picked.empty() );
440
441 // The same empty lasso with Shift leaves the set alone
442 picked = { *key0 };
443 BlockDragLassoPick( { points.get() }, BlockDragPickRect( VECTOR2I( 500, 500 ), VECTOR2I( 600, 600 ) ), true,
444 picked );
445
446 BOOST_REQUIRE_EQUAL( picked.size(), 1 );
447 BOOST_CHECK( picked.count( *key0 ) == 1 );
448}
449
450
451// A chain with fewer than three points surrounds nothing, and a plain lasso with
452// one still clears the picked set
453BOOST_AUTO_TEST_CASE( DegenerateLassoPicksNothing )
454{
455 BOARD board;
456 ZONE* zone = new ZONE( &board );
457 board.Add( zone );
458
459 std::shared_ptr<EDIT_POINTS> points = makeCollection( zone );
460
461 std::optional<PCB_HANDLE_KEY> key0 = PCB_HANDLE_KEY::Make( *points, &points->Point( 0 ) );
462
463 BOOST_REQUIRE( key0 );
464
465 std::set<PCB_HANDLE_KEY> picked{ *key0 };
466
467 SHAPE_LINE_CHAIN twoPoints( { VECTOR2I( -10, -10 ), VECTOR2I( 200, 200 ) }, true );
468
469 BlockDragLassoPick( { points.get() }, twoPoints, false, picked );
470
471 BOOST_CHECK( picked.empty() );
472
473 picked = { *key0 };
474 BlockDragLassoPick( { points.get() }, twoPoints, true, picked );
475
476 BOOST_REQUIRE_EQUAL( picked.size(), 1 );
477}
478
479
BLOCK_DRAG_CAPABILITY BlockDragCapability(const BOARD_ITEM &aItem)
Classify one board item for a block drag.
@ DEFORMABLE
Shows handles, and reshapes as the user drags the ones they picked.
@ RIGID
Moves with the block using its own move operation.
SHAPE_LINE_CHAIN BlockDragPickRect(const VECTOR2I &aFirst, const VECTOR2I &aSecond)
The closed rectangle a box pick covers, built from two opposite corners.
bool BlockDragHandlePickable(const EDIT_POINTS &aCollection, const EDIT_POINT &aPoint)
True when the user is allowed to pick this handle.
void BlockDragApplyPick(std::set< PCB_HANDLE_KEY > &aPicked, const PCB_HANDLE_KEY &aKey, bool aAccumulate)
Add one clicked handle to the picked set.
void BlockDragLassoPick(const std::vector< EDIT_POINTS * > &aCollections, const SHAPE_LINE_CHAIN &aLasso, bool aAccumulate, std::set< PCB_HANDLE_KEY > &aPicked)
Add the handles a lasso surrounds to the picked set.
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition board.cpp:1548
Edit behavior for ELLIPSE and ELLIPSE_ARC shapes.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
const KIID m_Uuid
Definition eda_item.h:599
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
unsigned int PointsSize() const
Return number of stored EDIT_POINTs.
EDIT_POINT & Point(unsigned int aIndex)
Represent a single point that can be used for modifying items.
Definition edit_points.h:44
bool DrivesWholeShape() const
Whether dragging this handle rebuilds the whole shape instead of placing one of its points,...
A geometric constraint between board items (issue #2329).
void AddMember(const KIID &aItem, CONSTRAINT_ANCHOR aAnchor=CONSTRAINT_ANCHOR::WHOLE, int aIndex=-1)
Lasting name for one handle in an EDIT_POINTS collection.
static std::optional< PCB_HANDLE_KEY > Make(const EDIT_POINTS &aPoints, const EDIT_POINT *aPoint)
Build the key for a handle in a collection.
void SetEllipseCenter(const VECTOR2I &aPt) override
void SetEllipseMinorRadius(int aR) override
void SetEllipseMajorRadius(int aR) override
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Handle a list of polygons defining a copper zone.
Definition zone.h:70
@ ELLIPSE
Definition eda_shape.h:63
@ SEGMENT
Definition eda_shape.h:57
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
Definition eda_shape.h:58
@ F_Cu
Definition layer_ids.h:60
@ WHOLE
The item as a whole (a segment as a line, a circle).
@ HORIZONTAL
A segment (or two points) is horizontal.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(PickableFollowsCapabilityAndHandleKind)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_REQUIRE_EQUAL(rows.size(), 1)
BOOST_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_SUITE_END()
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708
static PIECE rect(double aLeft, double aTop, double aRight, double aBottom, bool aMixed=false)