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.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-05 10:07:25 +01:00
parent df73b84a47
commit ba5a89a620
4 changed files with 65 additions and 0 deletions

31
tests/core/bdddict.cc Normal file
View file

@ -0,0 +1,31 @@
// -*- 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;
}