9 create_code (gcc_jit_context
*ctxt
, void *user_data
)
11 /* Trigger an API error by passing bad data. */
12 gcc_jit_context_get_type (ctxt
, 42);
16 verify_code (gcc_jit_context
*ctxt
, gcc_jit_result
*result
)
18 /* Ensure that the bad API usage prevents the API giving a bogus
20 CHECK_VALUE (result
, NULL
);
22 /* Verify that the correct error message was emitted. */
23 CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt
),
24 ("gcc_jit_context_get_type:"
25 " unrecognized value for enum gcc_jit_types: 42"));