1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
// Author(s): Wieger Wesselink
// Copyright: see the accompanying file COPYING or copy at
// https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
/// \file data_specification_test.cpp
/// \brief Test for data specifications. This test belongs to the data
/// library, but unfortunately the data library contains no parser for
/// data specifications.
#include <boost/test/minimal.hpp>
#include "mcrl2/lps/specification.h"
#include "mcrl2/lps/linearise.h"
using namespace mcrl2;
using namespace mcrl2::data;
using namespace mcrl2::lps;
const std::string SPECIFICATION =
"act a; \n"
" \n"
"proc P(b:Bool) = a. P(b); \n"
" \n"
"init P(false); \n"
;
int test_main(int argc, char** argv)
{
specification spec = linearise(SPECIFICATION);
data_specification data = spec.data();
BOOST_CHECK(data.is_certainly_finite(sort_bool::bool_()));
BOOST_CHECK(!data.is_certainly_finite(sort_nat::nat()));
return 0;
}
|