LCOV - code coverage report
Current view: top level - atermpp/test - constructors.cpp (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 10 10 100.0 %
Date: 2020-10-20 00:45:57 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Wieger Wesselink
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : 
      10             : #define BOOST_TEST_MODULE constructors
      11             : #include <boost/test/included/unit_test_framework.hpp>
      12             : 
      13             : #include "mcrl2/atermpp/aterm_string.h"
      14             : #include "mcrl2/atermpp/aterm_io.h"
      15             : 
      16             : using namespace atermpp;
      17             : 
      18           3 : BOOST_AUTO_TEST_CASE(test_main)
      19             : {
      20           2 :   aterm_int i(10);
      21           2 :   atermpp::aterm x=aterm_appl(function_symbol("x",0));
      22           2 :   atermpp::aterm y=aterm_appl(function_symbol("y",0));
      23           2 :   aterm_appl f(function_symbol("f", 2), x, y);
      24           1 :   BOOST_CHECK(pp(f) == "f(x,y)");
      25           2 :   aterm_appl f1(function_symbol("f", 0));
      26           1 :   BOOST_CHECK(pp(f1) == "f");
      27             : 
      28           1 :   atermpp::aterm_string s("s"); // g++ 3.4.4 complains if atermpp:: is removed :-(
      29             :   // aterm_string s1("s1(x)"); will generate an error!
      30           4 : }

Generated by: LCOV version 1.13