Added tests for extern C functionality