4 Commits

Author SHA1 Message Date
e9275cca3a
fix: fix endianness in pol parser tests (#81)
* fix: make test cross-platform

* chore: add `PRegParser` header test (endianness)

* fix: header incorrect endianness
2024-08-14 13:42:21 +04:00
361155f763
wip: rewrite pol file serializator/deserializator (#68)
* wip: adding ragel file `pol.rl`

* wip: init cmake

* feat: update cmake files

* fead: add empty `parser.h`

* feat: add ragel to dockerfile

* wip: `libparsepol` adding

* fix: remove unnecessary `std::move`

* chore: remove ragel from docker

* chore: remove unnecessary comments

* chore: splitting tests into different methods

* chore: use `qDebug`/`qWarning`/`qCritical` instead of `std::cout`/`std::cerr`

* chore: use `QCOMPARE` instead of `std::runtime_error`/`assert` in tests

* chore: improve test for `QTest`

* fix: `BE QWORD` -> `LE QWORD`

* fix: allow multiply value with same `keyPath` and `valueName`

* chore: replace preprocessor macros with functions

* style: adding a line between functions

* chroe: small changes

style: small fix code format
wip: use one `uint64_t` variable instead of two `uint32_t` to comparison
fix: adding `Keypath` `Valuename` and type validation into writer

* chore: separate LE and BE tests

* chore: throw exception on `REG_NONE` and invalid iconv descriptor

* style: remove `./` from includes

* style: rename some functions

`bufferToString` -> `readStringFromBuffer`, `stringToBuffer` -> `writeStringToBuffer`,
`bufferToStrings` -> `readStringsFromBuffer`,
`stringsToBuffer` -> `writeStringsFromBuffer`,
`bufferToVector` -> `readVectorFromBuffer`,
`vectorToBuffer` -> `writeVectorToBuffer`,

* chore: minimize `getType`

* chore: rename `bufferToIntegral` -> `readIntegralFromBuffer`, `integralToBuffer` -> `writeIntegralToBuffer`

* chore: add new constants and use it insted of `reinterpret_cast<iconv_t>(-1)` and `reinterpret_cast<size_t>(-1)`

* chore: remove missing `./`

* chore: add missing include

* fix: rename `LittleEngian` -> `LittleEndian`

* fix: removing unnecessary PolicyBody

* chore: make `PRegParser` final and make all methods  non-virtual

* chore: remove unnecessary include

* style: rename iconv descriptors

* style: fix style
2024-08-05 15:56:14 +04:00
august-alt
636a6d3c7f fix: fix tests 2023-04-11 14:33:38 +04:00
august-alt
8f1d3f9a4a tests: add pol file test 2021-07-21 17:40:14 +04:00