Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modified test macros - Added new `instr_test` macro to encapsulate logic for testing instruction generation with a set and uniform instruction expected values and generation values. - Used `len` member instead of providing a general size of a buf- fer object * Added macro to testing framework - `assert_eq_buf` Added the new `assert_eq_buf` macro to the testing framework in `test.h` this macro is used in unit tests and can check if two buffers, `a` and `b` have the same length and values data pairs. This macro is especially useful when unit tests are rolled out for indivdual instructons to compare buffers and expected outcomes. * Added `assert_eq_buf_arr` A suppliment to previosuly added macro - `assert_eq_buf` in commit number c9fb1ef, this checks for the same values in two arrays instead of two value buffers as such of the ones defined in `buffer.c`, giving greater flexability * Updated `test.h` testing library - Abstracted the `assert_eq_buf` macro to leverage the behavior of the new `assert_eq_buf_arr` macro by providing `.data` member to the `arr_len` argument. - Adding error exiting function call when the assertion statement does not turn true to be consisten with other macros
- Loading branch information