Commit Graph

46 Commits

Author SHA1 Message Date
forbes
934cdf5767 test(assembly): regression tests for KCSolve solver refactor (#296)
All checks were successful
Build and Test / build (pull_request) Successful in 29m11s
Phase 1e: Add C++ gtest and Python unittest coverage for the pluggable
solver system introduced in Phases 1a-1d.

C++ tests (KCSolve_tests_run):
- SolverRegistryTest (8 tests): register/get, duplicates, defaults,
  available list, joints_for capability queries
- OndselAdapterTest (10 tests): identity checks, supported/unsupported
  joints, Fixed/Revolute solve round-trips, no-grounded-parts handling,
  exception safety, drag protocol (pre_drag/drag_step/post_drag),
  redundant constraint diagnostics

Python tests (TestSolverIntegration):
- Full-stack solve via AssemblyObject → IKCSolver → OndselAdapter
- Fixed joint placement matching, revolute joint success
- No-ground error code (-6), redundancy detection (-2)
- ASMT export produces non-empty file
- Deterministic solve stability (solve twice → same result)
2026-02-19 16:56:11 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
084003e361 Tests: Add/update SPDX header (#24547) 2025-10-09 13:50:17 -05:00
Chris Hennes
5388c32f10 Tests: Refactor tests with better names, etc.
The basic tests now run on Windows correctly without needing to manually
copy any files -- the executables are output in the same location as the
necessary DLLs. However, tests that require *.pyd files (all code in the
Mod subdirectory, basically) still do not work on Windows as the test
executables cannot find those files. This is a work in progress.
2025-06-15 17:31:19 -05:00
FilippoR
ff4740d082 Tests: Add FREECAD_USE_EXTERNAL_GTEST cmake option (#21190)
Add FREECAD_USE_EXTERNAL_GTEST cmake option and fix build with external libraries
2025-05-08 15:41:48 -05:00
Benjamin Nauck
93ea68a23b Gui: Add tests to automatically verify the axonometric views 2025-05-04 13:21:08 +02:00
Chris Hennes
42cd4d76f2 Start: Refactor f3d to use worker threads 2025-04-21 21:21:52 +02:00
tritao
6c2c6847eb CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Benjamin Bræstrup Sayoc
755229df23 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Joao Matos
cc6ffb44de Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Joao Matos
27ebc68a11 CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
tritao
9636068460 Base: Move zipios library to 3rdParty folder. 2025-02-14 13:08:28 -06:00
Chris Hennes
12a648145a Spreadsheet: Add C++ test framework 2024-11-25 23:09:35 -06:00
wmayer
062e11a3c8 Test: Add test for MeasureDistance with two circles 2024-10-23 23:07:49 +02:00
bgbsww
2a541c9536 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
wmayer
373533d030 Tests: Add tests for MeshPart 2024-07-22 00:06:23 -05:00
Chris Hennes
11fa271eb5 Test: Support system GTest, and give warning if no submodule (#13662) 2024-06-03 10:40:35 -05:00
Chris Hennes
f1690821a3 Toponaming: Test fixes 2024-05-20 12:40:52 -05:00
Chris Hennes
2aad8ab334 Tests: Ensure MSVC has M_PI
Somewhere in the test suite GTest is including cmath (or something related) and not declaring this, so later includes of it by the tests are being ignored.
2024-04-28 12:56:21 -05:00
bgbsww
46c32a8c1b Add c++ testing framework for PartDesign, ShapeBinder 2024-03-20 14:45:20 -05:00
PaddleStroke
1062ea4eb0 AssemblyTest: Introduce assembly test module 2024-02-13 08:26:54 +01:00
Adrián Insaurralde Avalos
2adc1bfce4 Test: build Mod test only if the module is being built 2024-02-02 00:04:39 +01:00
Jacob Oursland
0e9d5914cb Do not use pthreads in gtest with MSVC compilers. (#11584) 2023-11-30 18:02:11 -03:00
wmayer
55b5fa5d8c Tests: Set test executables in a central place 2023-11-22 01:47:24 +01:00
Pesc0
9cf678407c Allow automatic tests discovery 2023-11-20 16:12:27 +01:00
wmayer
0b0e9effeb tests: add initApplication() to avoid code duplications 2023-10-21 16:31:26 -05:00
David Carter
6624fa3775 Material: Material handling enhancements
Rework of the material handling system.

This first part concntrates on a rework of the material cards.
Rather than use a fixed list of possible properties, properties can
be defined separately in their own files and mixed to provide a
complete list of possible properties. Properties can be inherited.

The cards then provide values for the properties. These can also
be inherited allowing for small changes in cards as required.

The new property definitions are more extensive than previously.
2 and 3 dimensional arrays of properties can be defined. Values
are obtained by calling an API instead of reading from a dictionary.

For compatibility, a Python dictionary of values can be obtained
similar to how it was done previously, but this is considered a
deprecated API and won't support the newer advanced features.

The editor is completely reworked. It will be able to edit older format
material cards, but can only save them in the new format.

For testing during the development phase, a system preference can
specifiy wether the old or new material editors are to be used. This
option will be removed before release.
2023-09-25 11:04:01 -04:00
wmayer
0b63d0cecb Tests: move Sketcher test target to appropriate CMakeLists.txt file 2023-08-28 09:12:26 -05:00
wmayer
8a59350de8 Mesh: add unit tests 2023-08-27 18:55:02 +02:00
wmayer
423cc42ac8 Tests: add unit tests for:
* TopoShape::getElementTypeAndIndex
* ComplexGeoData::getTypeAndIndex

and fix crashes there when passing a null pointer
2023-08-25 19:23:18 +02:00
Chris Hennes
ee7779455a Test: Begin QuantitySpinBox QTests 2023-08-12 10:23:43 -07:00
Jonas Bähr
321c448c39 Fix build of "tests" on macOS
Building the C++ unit tests failed for
 tests/src/Mod/Sketcher/App/SketchObject.cpp
because some XML headers were not found. This was because the XercesC
include dir was not in the search list for headers.

Details:
> In file included from /Users/jonas/src/FreeCAD/FreeCAD-git/tests/src/Mod/Sketcher/App/SketchObject.cpp:7:
> In file included from /Users/jonas/src/FreeCAD/FreeCAD-git/src/App/Application.h:33:
> /Users/jonas/src/FreeCAD/FreeCAD-git/src/Base/Parameter.h:55:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
> #include <xercesc/util/XercesDefs.hpp>
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the same issue as already adresses previously with PR9657 [1] but
the test for SketchObject was added later [2].

[1]: https://github.com/FreeCAD/FreeCAD/pull/9657
[2]: 532b391b69
2023-08-11 06:33:38 -07:00
Jonas Bähr
e3de4f217c minor reformat: break lines, one per item 2023-08-11 06:33:38 -07:00
berniev
64f9251cae link gmock 2023-08-04 18:48:33 -06:00
Ajinkya Dahale
532b391b69 [Sketcher] [gtest] Add SketchObject test
Create a document and then add a `SketchObject` to it. Does not work without
creating document.

Also `FCConfig.h` is needed for `FC_OS_WIN32`.
2023-07-21 22:43:45 -05:00
Jonas Bähr
b1782ee3d6 Fix build of "tests" on macOS
Building the C++ unit tests failed for
 tests/src/App/Metadata.cpp
 tests/src/Base/Reader.cpp
because some XML headers were not found. This was because the XercesC
include dir was not in the search list for headers.
I cannot say why only macOS seems to be affected, but it's not the first
time, see e.g a1776d3e74
2023-06-08 10:57:13 -04:00
Chris Hennes
c9f73bda9e App/Toponaming: Minor refactoring and tests for StringID 2023-05-11 14:34:35 -05:00
Chris Hennes
22d8c8f0dd Sketcher: Add gtest unit test framework 2023-04-22 20:56:29 +02:00
wmayer
645812b8f7 Tests: suppress warnings C4251 in test module 2023-03-12 17:58:11 +01:00
wmayer
519d26e13c CMake: fix linking error in test function when linking Python statically 2023-02-19 20:51:44 +01:00
berniev
9a05a04dad Improve unit testing directory structure
Separate Qt tests and gtest tests
Add a basic shadow of the project structure
Add a few simple tests to demonstrate usage
2023-01-30 07:15:09 -07:00
wmayer
a89d7b7355 Test: [skip ci] add tests for Base::Tools::getUniqueName 2022-12-30 16:07:26 +01:00
wmayer
7bd0394f13 Test: [skip ci] fix build failure when linking Python statically 2022-12-05 15:34:58 +01:00
wmayer
f6cf0e7f3d Test: [skip ci] fix linking errors of Google tests with MSVC 2022-12-02 14:49:36 +01:00
wmayer
97ab7714fe Base: fix InventorBuilder and add more unit tests 2022-12-01 18:05:57 +01:00
wmayer
1d7369e321 QtTest: [skip ci] enable Qt testing framework 2022-12-01 13:57:00 +01:00
berniev
b3274122e3 Introduce GoogleTest C++ unit testing framework 2022-12-01 12:33:14 +01:00