Commit ba5a89a6 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

tests: add a test for bdd_dict::assert_emptiness()

This improves the coverage for bdd_dict::assert_emptiness() and
bdd_dict::dump().

* tests/core/bdddict.cc, tests/core/bdddict.test: New files.
* tests/Makefile.am, tests/core/.gitignore: Adjust.
parent df73b84a
......@@ -62,6 +62,7 @@ core/defs: $(top_builddir)/config.status $(srcdir)/core/defs.in
# Keep this sorted alphabetically.
check_PROGRAMS = \
core/acc \
core/bdddict \
core/bitvect \
core/checkpsl \
core/checkta \
......@@ -100,6 +101,7 @@ check_PROGRAMS = \
# Keep this sorted alphabetically.
core_acc_SOURCES = core/acc.cc
core_bdddict_SOURCES = core/bdddict.cc
core_bitvect_SOURCES = core/bitvect.cc
core_checkpsl_SOURCES = core/checkpsl.cc
core_checkta_SOURCES = core/checkta.cc
......@@ -204,6 +206,7 @@ TESTS_misc = \
TESTS_twa = \
core/acc.test \
core/acc2.test \
core/bdddict.test \
core/alternating.test \
core/ltlcross3.test \
core/taatgba.test \
......
acc
apcollect
bdddict
bddprod
bitvect
blue_counter
......@@ -45,6 +46,7 @@ nenoform
ngraph
output1
output2
parity
parse_print
powerset
*.ps
......
// -*- coding: utf-8 -*-x
// Copyright (C) 2017 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
// Spot is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// Spot is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <iostream>
#include <spot/tl/parse.hh>
#include <spot/twaalgos/translate.hh>
int main()
{
spot::formula f = spot::parse_formula("& & G p0 p1 p2");
spot::translator trans;
spot::twa_graph_ptr aut = trans.run(f);
aut->get_dict()->assert_emptiness(); // Should fail.
return 0;
}
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. ./defs
set -e
# Exercise bdd_dict::assert_emptiness()
../bdddict 2>stderr && exit 1
grep 'some maps are not empty' stderr
grep 'Var\[p0\] x2' stderr
grep 'Var\[p1\] x2' stderr
grep 'Var\[p2\] x2' stderr
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment