LCOV - code coverage report
Current view: top level - buildbot/coverage/build/test/api/cpp/issues - proj-issue383.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 16 17 94.1 %
Date: 2026-02-20 12:02:05 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Aina Niemetz
       4                 :            :  *
       5                 :            :  * This file is part of the cvc5 project.
       6                 :            :  *
       7                 :            :  * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS
       8                 :            :  * in the top-level source directory and their institutional affiliations.
       9                 :            :  * All rights reserved.  See the file COPYING in the top-level source
      10                 :            :  * directory for licensing information.
      11                 :            :  * ****************************************************************************
      12                 :            :  *
      13                 :            :  * Test for project issue #383.
      14                 :            :  */
      15                 :            : #include <cvc5/cvc5.h>
      16                 :            : 
      17                 :            : #include <cassert>
      18                 :            : 
      19                 :            : using namespace cvc5;
      20                 :            : 
      21                 :          1 : int main(void)
      22                 :            : {
      23                 :          1 :   TermManager tm;
      24                 :          1 :   Solver solver(tm);
      25                 :            : 
      26                 :          1 :   solver.setOption("produce-models", "true");
      27                 :            : 
      28                 :          2 :   DatatypeConstructorDecl ctordecl = tm.mkDatatypeConstructorDecl("_x5");
      29                 :          2 :   DatatypeDecl dtdecl = tm.mkDatatypeDecl("_x0");
      30                 :          1 :   dtdecl.addConstructor(ctordecl);
      31                 :          1 :   ctordecl = tm.mkDatatypeConstructorDecl("_x23");
      32                 :          1 :   ctordecl.addSelectorSelf("_x21");
      33                 :          1 :   dtdecl = tm.mkDatatypeDecl("_x12");
      34                 :          1 :   dtdecl.addConstructor(ctordecl);
      35                 :            :   try
      36                 :            :   {
      37                 :          1 :     tm.mkDatatypeSort(dtdecl);
      38                 :            :   }
      39         [ -  + ]:          1 :   catch (CVC5ApiException& e)
      40                 :            :   {
      41                 :          1 :     return 0;
      42                 :          1 :   }
      43                 :          0 :   assert(false);
      44                 :          1 : }

Generated by: LCOV version 1.14