Commit Graph

45 Commits

Author SHA1 Message Date
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
08d72f073e Tests: Add/update SPDX header (#24547) 2025-10-09 13:50:17 -05:00
Chris Hennes
98eee8a563 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
4b459846d4 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
84b4ef32bc Gui: Add tests to automatically verify the axonometric views 2025-05-04 13:21:08 +02:00
Chris Hennes
71932ac724 Start: Refactor f3d to use worker threads 2025-04-21 21:21:52 +02:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Benjamin Bræstrup Sayoc
ee1c73cd04 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
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
tritao
80b299bb88 Base: Move zipios library to 3rdParty folder. 2025-02-14 13:08:28 -06:00
Chris Hennes
f24c7da793 Spreadsheet: Add C++ test framework 2024-11-25 23:09:35 -06:00
wmayer
d5a9a8ae38 Test: Add test for MeasureDistance with two circles 2024-10-23 23:07:49 +02:00
bgbsww
608c80b5a3 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
wmayer
b3680522f3 Tests: Add tests for MeshPart 2024-07-22 00:06:23 -05:00
Chris Hennes
c622221c70 Test: Support system GTest, and give warning if no submodule (#13662) 2024-06-03 10:40:35 -05:00
Chris Hennes
5dadd2c3c3 Toponaming: Test fixes 2024-05-20 12:40:52 -05:00
Chris Hennes
5766505f20 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
29aa87b2fa Add c++ testing framework for PartDesign, ShapeBinder 2024-03-20 14:45:20 -05:00
PaddleStroke
03831b8fe3 AssemblyTest: Introduce assembly test module 2024-02-13 08:26:54 +01:00
Adrián Insaurralde Avalos
691511e975 Test: build Mod test only if the module is being built 2024-02-02 00:04:39 +01:00
Jacob Oursland
9e1639783e Do not use pthreads in gtest with MSVC compilers. (#11584) 2023-11-30 18:02:11 -03:00
wmayer
d9227d9261 Tests: Set test executables in a central place 2023-11-22 01:47:24 +01:00
Pesc0
a8dee2ed90 Allow automatic tests discovery 2023-11-20 16:12:27 +01:00
wmayer
931fcdabbf tests: add initApplication() to avoid code duplications 2023-10-21 16:31:26 -05:00
David Carter
902af79514 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
1816c2a1aa Tests: move Sketcher test target to appropriate CMakeLists.txt file 2023-08-28 09:12:26 -05:00
wmayer
0ae4ef2d2f Mesh: add unit tests 2023-08-27 18:55:02 +02:00
wmayer
2c2347f746 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
00b45b14d5 Test: Begin QuantitySpinBox QTests 2023-08-12 10:23:43 -07:00
Jonas Bähr
7c7ea461b0 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]: 03bb503283
2023-08-11 06:33:38 -07:00
Jonas Bähr
2e1259482f minor reformat: break lines, one per item 2023-08-11 06:33:38 -07:00
berniev
703689955f link gmock 2023-08-04 18:48:33 -06:00
Ajinkya Dahale
76834f6a13 [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
1bd8082a7e 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 05469895f9
2023-06-08 10:57:13 -04:00
Chris Hennes
ed7d79b0f5 App/Toponaming: Minor refactoring and tests for StringID 2023-05-11 14:34:35 -05:00
Chris Hennes
38cac0f995 Sketcher: Add gtest unit test framework 2023-04-22 20:56:29 +02:00
wmayer
12cb256a5d Tests: suppress warnings C4251 in test module 2023-03-12 17:58:11 +01:00
wmayer
826c65993c CMake: fix linking error in test function when linking Python statically 2023-02-19 20:51:44 +01:00
berniev
1848f57908 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
fd7f93499d Test: [skip ci] add tests for Base::Tools::getUniqueName 2022-12-30 16:07:26 +01:00
wmayer
3cc94fabf5 Test: [skip ci] fix build failure when linking Python statically 2022-12-05 15:34:58 +01:00
wmayer
cf2321196a Test: [skip ci] fix linking errors of Google tests with MSVC 2022-12-02 14:49:36 +01:00
wmayer
e7c6262d11 Base: fix InventorBuilder and add more unit tests 2022-12-01 18:05:57 +01:00
wmayer
4e8ecc41b6 QtTest: [skip ci] enable Qt testing framework 2022-12-01 13:57:00 +01:00
berniev
edd6bb53de Introduce GoogleTest C++ unit testing framework 2022-12-01 12:33:14 +01:00