Added C API tests.

Added C API tests.