Skip to content

Move alloc tests to expected-output tests

This moves the allocation function tests to the tests having expecting a fixed output.

To facilitate this, a number of C helper functions have been added so that the same output will always be obtained for the passing case. For easier debugging, these functions will output the full returned pointer value upon failure.

The alignment checks use a cast to uintptr_t which, to my knowledge, should avoid UB.

Note: this branch is based off the one used in MR !224 (merged) due to some bugfixes there. I guess it makes sense to merge that MR first, assuming it can be accepted. Edit: Now rebased to master.

Edited by Peter Limkilde Svendsen

Merge request reports