Commit Graph

56 Commits

Author SHA1 Message Date
wmayer
0c25b29680 Base: Fix possible race condition when restarting the application
When restarting the application (e.g. after installing an addon) the application will be closed and a new instance will be launched. Now it can happen that the old instance is still busy writing the config files to disk while the new instance wants to read them in. At this time it's possible that a config file is in an invalid state so that the new instance will ignore it but then starts with a default configuration.
Later when closing the new instance the config files will be overwritten and destroy the user's original settings.

By using a lock file this race condition will be avoided. It uses a timeout of 1 second that should be enough for the old instance to write the files to disk.
2024-04-18 23:07:58 -05:00
wmayer
a713d5f96f Tests: add more unit tests for ParameterGrp 2024-04-17 21:45:26 +02:00
Chris Hennes
2f81d8712b Toponaming/Base: Add ASCII stream output class (#13209)
* Toponaming/Base: Add ASCII stream output class

* Remove the ref from std::string

* Update based on review comments
2024-04-15 17:58:11 +02:00
wmayer
69bcabeb0b Tests: add Parameter tests 2024-04-12 23:37:56 +02:00
Ladislav Michl
a691d6fcdc Base: Use std::chrono for time handling
Replace platform specific implementations with standard C++ std::chrono.
As time_t is now 64-bit on all supported systems, use it to set the clock.
2024-03-05 12:22:40 +01:00
Florian Foinant-Willig
f9cebebd6b PD: handle null pointer in Feature::getBaseShape (#12385) 2024-02-13 17:41:25 -03:00
PaddleStroke
59ba16582e vector3d getAngleOriented test. 2024-02-13 08:26:49 +01:00
Adrián Insaurralde Avalos
592b31eb7b Base: escape quotes in Quantity::getSafeUserString
fix #12204 and fix #12206
2024-02-12 12:09:30 -06:00
wmayer
53427edc2c Tests: add unit tests for IsNormal() and IsParallel() 2024-02-12 11:58:45 -06:00
Adrian Insaurralde Avalos
f5da3925d9 Add Base::Tools::escapeQuotesFromString with corresponding test
To be used to avoid sending unescaped quotes to python console
2024-02-04 16:44:25 -06:00
Ladislav Michl
5fe2b33bb0 Tests: Avoid use of fmtlib when not needed 2024-01-15 17:38:56 +01:00
wmayer
c0e15b111b Tests: fix failure in InventorBuilder_Tests_run 2023-11-13 13:21:19 +01:00
wmayer
334ca6a416 Test: add unit tests for Matrix4D::decompose() 2023-10-19 19:25:25 +02:00
wmayer
e3fb3b9639 Base: add method XMLReader::isStartOfDocument() 2023-10-12 19:46:21 +02:00
wmayer
4e8f9cebdb Tests: extend some reader tests after fixing givenDataAsXMLStream 2023-10-12 12:07:47 +02:00
wmayer
9e1a495fe8 Tests: fix undefined behaviour in givenDataAsXMLStream 2023-10-11 12:05:37 +02:00
Chris Hennes
80be10c643 Base/Toponaming: Refactor to extract filters to new file 2023-10-10 11:28:30 -05:00
Chris Hennes
33abb7b5b1 App/Toponaming: Add base64 encoding to XML 2023-10-10 10:19:43 -05:00
wmayer
eafe867f2a Tests: add unit tests for XMLReader::readNextElement() 2023-10-09 15:06:45 +02:00
Jolbas
5d39d7c3e9 Matrix.decompose() fix
Fixes some errors when matrix has zero scale in one or two directions
2023-09-28 15:25:29 -05:00
Jolbas
31637adaa0 Create rotation from any matrix
To help find a matrix components a decompose method is added to Matrix class
2023-09-28 15:25:29 -05:00
wmayer
7bef828734 Tests: add some more unit tests for Matrix class 2023-09-18 01:21:07 +02:00
wmayer
7eff934913 Base: fix incorrect method names of Matrix class about diagonal and trace 2023-09-18 01:21:07 +02:00
wmayer
d9d7bf87ae MSVC: fix several compiler warnings 2023-09-12 22:57:26 +02:00
pre-commit-ci[bot]
e92ed45df9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
246a387625 Tests: Reformat to current clang-format standard 2023-09-03 09:51:42 -05:00
wmayer
beabfd9e06 Base: fixes #10462: mesh.unite() causes segementaion fault 2023-09-03 11:14:34 +02:00
wmayer
48202e940e Base: add unit tests 2023-08-27 18:55:02 +02:00
wmayer
1b7d96f55a Base: add methods to get volume and get max/min points 2023-08-27 03:11:00 +02:00
wmayer
9dd4779252 Test: add more unit tests 2023-08-26 13:17:53 +02:00
Chris Hennes
00b45b14d5 Test: Begin QuantitySpinBox QTests 2023-08-12 10:23:43 -07:00
wmayer
95e8c5d5a5 gcc: support to build with v7.5 2023-08-10 11:22:08 +02:00
wmayer
1ab94d290e MSVC: fix build failure caused by PR #10138 2023-08-09 18:17:32 +02:00
wmayer
30ae3e6b5c fixes #10127: Usage of std::filesystem in test bumps minimum GCC version to GCC 8 2023-08-09 13:52:42 +02:00
sliptonic
ef4ca26382 Merge pull request #9594 from wwmayer/issue_9549_new
Part: fixes #9549: Part Fuse not working inside Part container
2023-07-24 10:16:51 -05:00
wmayer
98a4b1d399 Base: add helper function to quote a string and join a list of strings 2023-05-15 23:40:07 +02:00
Chris Hennes
987f502afe App/Toponaming: Fix Reader tests for Linux 2023-05-11 14:34:35 -05:00
Chris Hennes
ed7d79b0f5 App/Toponaming: Minor refactoring and tests for StringID 2023-05-11 14:34:35 -05:00
Chris Hennes
b2de5ae515 App/Toponaming: Tests for Bitmask 2023-05-11 14:34:35 -05:00
Chris Hennes
7ccd3394e5 App/Toponaming: Tests for Reader and Writer 2023-05-11 14:34:35 -05:00
Chris Hennes
cc7effcfc7 App/Toponaming: Lint and compilation cleanup 2023-05-11 14:34:35 -05:00
Chris Hennes
9e9e0f7593 Formatting: Apply pre-commit to tests/src 2023-04-06 08:07:53 +02:00
berniev
d50d783e26 Multiple files under test in one test file
Put Unit into its own test file and rename Units.cpp to Quantity.cpp
2023-03-02 22:12:21 +01:00
wmayer
3d59883be5 Tests: add test of a matrix without rotation part to raise an exception 2023-02-28 22:28:21 +01:00
wmayer
7abf48f34d Tests: add test to parse string to get quantity 2023-02-28 15:17:06 +01:00
wmayer
c8a35d85fe Base: fix pow() of Quantity 2023-02-27 22:13:08 +01:00
wmayer
b41ba49c5d Tests: add more unit tests 2023-02-27 20:07:01 +01:00
wmayer
201faebb99 Tests: fix Lint issue cppcoreguidelines-init-variables 2023-02-26 13:30:44 +01:00
wmayer
946588fed8 Tests: exclude some lint warnings 2023-02-26 08:58:51 +01:00
wmayer
67b14d83a0 Tests: add unit tests for Matrix4D and Rotation 2023-02-26 08:58:51 +01:00