mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	More new OCaml API
This commit is contained in:
		
							parent
							
								
									824169da0a
								
							
						
					
					
						commit
						b99fcb9c8a
					
				
					 6 changed files with 165 additions and 149 deletions
				
			
		| 
						 | 
				
			
			@ -190,9 +190,10 @@ let basic_tests ( ctx : context ) =
 | 
			
		|||
  (* Error handling test. *)
 | 
			
		||||
  try (
 | 
			
		||||
    let i = Integer.mk_numeral_s ctx "1/2" in
 | 
			
		||||
    raise (TestFailedException (numeral_to_string i)) (* unreachable *)
 | 
			
		||||
    Printf.printf "%s\n" (Expr.to_string i) ;
 | 
			
		||||
    raise (TestFailedException "check")
 | 
			
		||||
  )
 | 
			
		||||
  with Z3native.Exception(_) -> (
 | 
			
		||||
  with Z3.Error(_) -> (
 | 
			
		||||
    Printf.printf "Exception caught, OK.\n" 
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -342,7 +343,7 @@ let _ =
 | 
			
		|||
      );
 | 
			
		||||
    Printf.printf "Exiting.\n" ;
 | 
			
		||||
    exit 0
 | 
			
		||||
  ) with Z3native.Exception(msg) -> (
 | 
			
		||||
  ) with Error(msg) -> (
 | 
			
		||||
    Printf.printf "Z3 EXCEPTION: %s\n" msg ;
 | 
			
		||||
    exit 1
 | 
			
		||||
  )    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue