LCOV - code coverage report
Current view: top level - buildbot/coverage/build/test/api/cpp/issues - issue4889.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 17 17 100.0 %
Date: 2026-03-15 10:41:23 Functions: 1 1 100.0 %
Branches: 0 0 -

           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 issue #4889
      11                 :            :  */
      12                 :            : 
      13                 :            : #include <cvc5/cvc5.h>
      14                 :            : 
      15                 :            : using namespace cvc5;
      16                 :            : 
      17                 :          1 : int main()
      18                 :            : {
      19                 :          1 :   TermManager tm;
      20                 :          1 :   Solver slv(tm);
      21                 :          1 :   Sort sort_int = tm.getIntegerSort();
      22                 :          1 :   Sort sort_array = tm.mkArraySort(sort_int, sort_int);
      23                 :          1 :   Sort sort_fp128 = tm.mkFloatingPointSort(15, 113);
      24                 :          1 :   Sort sort_fp32 = tm.mkFloatingPointSort(8, 24);
      25                 :          1 :   Sort sort_bool = tm.getBooleanSort();
      26                 :          1 :   Term const0 = tm.mkConst(sort_fp32, "_c0");
      27                 :          1 :   Term const1 = tm.mkConst(sort_fp32, "_c2");
      28                 :          1 :   Term const2 = tm.mkConst(sort_bool, "_c4");
      29                 :          5 :   Term ite = tm.mkTerm(Kind::ITE, {const2, const1, const0});
      30                 :          4 :   Term rem = tm.mkTerm(Kind::FLOATINGPOINT_REM, {ite, const1});
      31                 :          3 :   Term isnan = tm.mkTerm(Kind::FLOATINGPOINT_IS_NAN, {rem});
      32                 :          1 :   slv.checkSatAssuming(isnan);
      33                 :          1 :   return 0;
      34                 :          1 : }

Generated by: LCOV version 1.14