Commit graph

19 commits

Author SHA1 Message Date
Riccardo Schirone
6c665c6098 Use Rizin specific macros instead of the ones from SDB 2022-07-17 12:11:13 +02:00
Riccardo Schirone
2f1e39818e Add liblzma subproject 2022-07-02 10:12:26 +02:00
Giovanni
e8af5a1320
Support rz_read_<endianness>_float/rz_read_<endianness>_double (#850)
* Support rz_read_<endianness>_float/rz_read_<endianness>_double
* Fix me encoding
* Added endian tests
2021-03-17 15:03:37 +01:00
Riccardo Schirone
53bf5c497f SPDX Copyright text for all files based on history
- Add LICENSES directory
- Download additional licenses used
- Add .reuse directory
- Add doc about SPDX/reuse

Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2021-03-05 19:39:15 +08:00
Riccardo Schirone
d6be0b26ca test/unit: we can't rely on the ordering stdout/stderr are captured
glibc-compiled rizin first finds the stderr output, then the stdout
output, while on musl-compiled rizin the stdout output is first (it's
also printed first by the program, so it makes more sense) then comes
the stderr output.

This is probably due to different buffering policies within glibc and
musl.
2021-02-25 19:41:38 +08:00
Khairul Azhar Kasmiran
37d24d7f71
Fix -Wformat-truncation warnings (#493)
* Fix -Wformat-truncation warnings

* Don't evaluate macro parameters multiple times
2021-01-30 12:15:34 +08:00
Anton Kochkov
a0be4e2e64 Run clang-format 2021-01-21 22:05:44 +08:00
Khairul Azhar Kasmiran
e673afe71b
minunit.h: Use snprintf instead (#367)
* #define minunit buf size

* Use snprintf instead in minunit.h

* Use snprint_mem instead

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2021-01-16 16:34:49 +08:00
Khairul Azhar Kasmiran
c10f78e9df
Fix minunit -Wformat-overflow= warning by increasing msg buf size (#355) 2021-01-14 17:35:51 +08:00
Riccardo Schirone
73080975d4 Fix autocompletion unit tests on Windows by using RZ_SYS_DIR 2021-01-03 11:42:38 +01:00
Riccardo Schirone
a7fd3fa3c6 Use mu_main to reduce boilerplate in unit tests
* Disable colors on Windows because terminal looks bad otherwise
* Use environment on Windows to set PATH and make sure unit tests use
  the compiled libraries and not the installed ones
* Define ssize_t on Windows as well by using SSIZE_T

Update test_analysis_block.c

Update test_intervaltree.c

Update test_unum.c
2021-01-03 11:42:38 +01:00
Florian Märkl
3ef9c81da9
Add the r_json json parser based on nxjson ##util (#17439) 2020-08-14 20:57:09 +02:00
Riccardo Schirone
58e5aa0887
Enable unit tests compilation by default in meson (#16990)
Including Fixes for Windows
2020-06-04 12:14:15 +02:00
Riccardo Schirone
64e6df5004
Extend RCmdDesc with different types (#16738)
* Add RCmdDesc and use it for newshell to call command handlers
* Keep supporting existing RCorePlugin commands
* Properly free RCmdDesc tree
* Remove help from API because not used
* Check for cp->call before using it
* Set res to 0 because otherwise it could exit too early
2020-05-06 14:34:19 +08:00
Riccardo Schirone
169531abb5
Pass parsed arguments directly to RCmd (#16703)
* Remove r_cmd_call_long API because never used
* Remove r_cmd_add_long because never used
* Remove r_cmd_args and fix some spaces
* Add RCmdParsedArgs and unit tests
* Introduce r_cmd_call_parsed_args and use it in cmd.c
* Introduce RCmdParsedArgs in cmd.c
2020-04-24 09:46:43 +02:00
Riccardo Schirone
d861918379
Fix minunit.h to compute macro arguments just one time (#16260) 2020-03-19 20:13:21 +01:00
Florian Märkl
a5e11a3f55
Refactor Anal Hints (#15876) ##anal
* Use RVector for Address Hints
* Add Arch/Bits Hint Trees
* Add Unit Tests for Addr, Arch and Bits Hints
* Add unset for newbits
* Fix jmptbl hint fetching
* Fix r_anal_*_bits_foreach
* Print grouped Anal Hints
* Fix arch bit affect on disasm
* Add Reset Hints to Commands
2020-02-13 11:48:24 +01:00
Florian Märkl
e866f8f21f Add RIntervalTree data structure ##util (#15541)
* Add RRangeTree
* Inclusive/Exclusive
* Add r_interval_tree_delete and r_interval_tree_resize
* Fix r_interval_tree_all_at()
2019-12-09 00:07:10 +01:00
Florian Märkl
ae61aa8e37
Imports Tests from radare2-regressions (#15546) 2019-12-08 15:31:14 +01:00