Apply small refactor to unit tests

Redefine macro constants as enums in the ffi and import those in their
respective test modules.