Commit Graph

11 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Adrian Insaurralde Avalos
667b841de1 [Base] fix some unit tests that where dependent on user config
redundant and faulty test `imperial_decimal_1_mm_default_precision` removed, it is already covered by `imperial_decimal_1_mm_precision_2`
2025-10-14 12:42:24 +02:00
Ladislav Michl
1cd47c2dd4 Base: add back Imperial for Civil Engineering unit conversions
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
01b547912f Base: QuantityFormat: avoid storing formatting defaults
User defined precision and fractional inch are stored on QuantityFormat
construction making changes persistent to object life time.
Change that so until not explicitely overriden, user defined values
are always returned.

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-05 17:31:54 +02:00
wmayer
e5e251df8f Test: Add further test cases for quantities 2025-06-03 09:31:38 +02:00
wmayer
19bb0a5d52 Test: Add test case for UnitsSchemaMeterDecimal 2025-06-03 08:16:18 +02:00
Benjamin Nauck
1678171e6b Base: Add more tests for imperial building special function 2025-05-20 12:34:00 +02:00
Benjamin Nauck
4241d795c0 Base: Skip test for units using GTEST_SKIP() instead of comments 2025-05-20 12:34:00 +02:00
bofdahof
285a930d70 Base: restore output format of imperial fraction units
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-05-19 12:15:51 +02:00
Ladislav Michl
beccce4d3c Base: revert to using ASCII chararacters for imperial lengths
The new unit schema management is using U+2032 and U+2033 characters
for feet and inches while parser is expecting only ' and ", while
U+2032 and U+2033 are used for arcminute and arcsecond.

While this is not an ideal solution and parser should deal with both,
revert back to ASCII for now.

Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-05-14 11:39:09 +02:00
bofdahof
1155f0d752 Base: simplify UnitsSchemas management
Fixes: Maintaining schemas is difficult and error-prone

- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
2025-04-27 00:45:54 +02:00