1 #include <stdlib.h>
2 #include <stdio.h>
3 
4 #include "libgccjit.h"
5 
6 #include "harness.h"
7 
8 static char *dump;
9 
10 void
create_code(gcc_jit_context * ctxt,void * user_data)11 create_code (gcc_jit_context *ctxt, void *user_data)
12 {
13   gcc_jit_context_enable_dump (ctxt,
14 			       "not-a-valid-dump-switch",
15 			       &dump);
16 }
17 
18 void
verify_code(gcc_jit_context * ctxt,gcc_jit_result * result)19 verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
20 {
21   CHECK_VALUE (result, NULL);
22 
23   /* Verify that the correct error message was emitted.  */
24   CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
25 		      "unrecognized dump: not-a-valid-dump-switch");
26 }
27 
28