Commit Graph

7 Commits

Author SHA1 Message Date
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