Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * Test for project issue #440. 11 : : */ 12 : : #include <cvc5/cvc5.h> 13 : : 14 : : #include <cassert> 15 : : 16 : : using namespace cvc5; 17 : : 18 : 1 : int main(void) 19 : : { 20 : 1 : TermManager tm; 21 : 1 : Solver solver(tm); 22 : : 23 : 1 : solver.setLogic("QF_ALL"); 24 : 1 : solver.setOption("global-negate", "true"); 25 : 1 : solver.setOption("produce-unsat-cores", "true"); 26 : 1 : Term t9 = tm.mkBoolean(true); 27 : 3 : Term t109 = tm.mkTerm(Kind::NOT, {t9}); 28 : : // should throw an option exception 29 : : try 30 : : { 31 : 1 : solver.checkSatAssuming({t109}); 32 : : } 33 [ - + ]: 1 : catch (CVC5ApiException& e) 34 : : { 35 : 1 : return 0; 36 : 1 : } 37 : 0 : assert(false); 38 : 1 : }