1
0
mirror of synced 2024-11-12 10:10:53 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
KOLANICH
749823e044
build: Move -s additional compiler flags into linker flags, and enable it only when gcc/clang are used. (#1087)
Compiler when compiling doesn't use them in those cases and emit a
warning, which is turned into an error by `-Werror`. Unfortunately,
CPack doesn't expose the logic it uses for stripping binaries.
2023-05-20 13:37:57 +02:00
WerWolv
f7dd28002e build: Build everything using -Wpedantic 2023-01-04 14:03:09 +01:00
gudzpoz
eca5fb894f
feat: Added LEB128 in data inspector (#615)
* feat: Added LEB128 in data inspector

* feat: Added support for editing LEB128 values

* Moved LEB functions from utils.cpp to crypto.cpp

* Added placeholders for translations

* Made DataInspector::impl::Entry.maxSize mandatory

* Fixed undefined leftshifting behaviour
2022-08-01 13:20:20 +02:00
WerWolv
ce59226909 sys: Reformat all 2022-02-01 22:09:44 +01:00
WerWolv
1991afb87b
sys: Get rid of SharedData struct and cleanup code structure (#411)
* sys: Initial refactoring of the SharedData class

* sys/pattern: More refactoring, make every provider have its own patterns

* sys: Finished up refactoring. No more SharedData!

* sys: Fixed compile on Unix

* tests: Fixed unit tests

* sys: Moved view and lang files

* pattern: Added assignment operator support to for loops

* tests: Fixed compile issue
2022-02-01 18:09:40 +01:00
WerWolv
e6f1dd0490 tests: Improved testing environment, added helpers tests 2022-01-29 17:14:15 +01:00
WerWolv
0e08b0226b sys: Added clang-format file, formatted entire project 2022-01-24 20:53:17 +01:00
WerWolv
3e736b36b6 api: Refactored providers to allow for loading interfaces and config views 2021-12-12 00:41:44 +01:00
RADICS Áron
467e9d1463
Tests for the CRC and hash algorithms (#335)
* Update TEST_ASSERT to do nothing if condition is true

The TEST_ASSERT should not return if the condition is true, because:
- it prevents the usage of multiple TEST_ASSERT in a single test case,
- that behavior differs from how the assert in the standard library
works, and thus may give unexpected results.

Make the TEST_ASSERT to print an error message (with an formatted
optional user part) when it fails to make debugging easier.

* Fix some bugs in TestProvider, add unit tests

Use pointer-to-vector in TestProvider so writes can be tested, too.

* Add test EncodeDecode16, fix some encode16 bugs

The function mbedtls_mpi_write_string needs a bit longer buffer than the
resulting string actually will be.

Known bug: mbedtls_mpi_read_binary ingores initial null bytes

* Add test EncodeDecode64, fix some bugs

The functions mbedtls_base64_encode and mbedtls_base64_decode needs a
bit longer buffer than the resulting string actually will be.

* Remove check for empty data from TestProvider

It can be valid to get the hash of empty string.

* Add tests for CRC calculation

Two type of thests:
- compare the result of the CRC calculation to a known to be good
results,
- generate random data as message, calculate of it's CRC and append that
to the message, the CRC of this new data should be 0.

* Add test for hash algorithms

* Add includes in tests

* Remove the use of C++20 ranges

It seems that Apple Clang does not support range-based constrained
algorithms at this time.

* Replace encode16 implementation

To encode the zero bytes at the begining of the input vector, too.
2021-11-26 22:14:44 +01:00
WerWolv
d9a77d396c tests: Fixed endian test being marked as failing 2021-10-20 11:23:06 +02:00
WerWolv
442f164159 tests: Added endian changer tests 2021-10-20 11:17:55 +02:00
WerWolv
1b6035d6c6 tests: Added properly working custom unit tests 2021-10-14 21:19:31 +02:00
WerWolv
9b316795fc tests: Refactor to add support for other types of tests 2021-10-12 21:32:33 +02:00