2
0
mirror of https://github.com/boostorg/locale.git synced 2026-01-19 16:32:09 +00:00

9 Commits

Author SHA1 Message Date
Alexander Grund
5a58e65bda Remove superflous subfolders of src
The shorter paths make the sources easier to navigate.

Basically revert of #99 / f44b3bb771
after the underlying issue is resolved.
2025-01-10 12:50:45 +01:00
Alexander Grund
f0d95b079b Add TEST_CONTEXT
Avoid to require manual output in anticipation of failures.
2024-12-01 19:36:58 +01:00
Alexander Grund
9f4424d7db test: Include file in error message
Also move the error reporting to a single function
2024-12-01 19:33:38 +01:00
Alexander Grund
cc075982c0 Update doc/changelog 2023-04-24 21:47:26 +02:00
Alexander Grund
66c95ab434 Improve test coverage
- Add test for `basic_message::swap`
- Exclude some cases which would be coding errors
- Add more tests for plural expression errors
2023-04-23 13:40:46 +02:00
Alexander Grund
2254927676 Remove bitwise/shift ops from plural expression in MO catalogs
Unary minus and bitwise ops (shift, xor, ...) are not supported by GNU gettext.
Furthermore once can easily run into undefined behavior when using those
and there doesn't seem to be a valid use in determining the plural form
using those.
Unary minus is kept as it is useful for testing at least.
2023-04-21 18:39:27 +02:00
Alexander Grund
d1bb994977 Use long long as the count argument for translations
GNU gettext uses `unsigned long`. So switch from `int` to `long long` to
cover at least the same range.
2023-04-21 18:39:27 +02:00
Alexander Grund
d41d2bfcc6 Introduce plural_expr and enhance tests
Encapsulate the pointer in a class to be able to directly invoke it.
Add tests for each operator, precedence order and corner cases.
2023-04-21 18:39:27 +02:00
Alexander Grund
8908a5c971 Add test for parsing the plural expression in catalogs
The parser and evaluator of plural expressions in PO/MO files isn't
really tested thorouhly.
Add tests for expressions from some languages as well as some basic
tests for all possible operations comparing those against the result of
calculating the value in C++.
2023-04-14 15:14:56 +02:00