From 8269ae9ceef964ca3f519ed34083bf8e7e8f2188 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 12 Apr 2012 17:54:20 +0200 Subject: [PATCH] tgbaexplicit: execute the test * src/tgbatest/explicit2.test: New file. * src/tgbatest/Makefile.am: Add it. * src/tgbatest/explicit2.cc: Print the LTL formula as text. --- src/tgbatest/Makefile.am | 1 + src/tgbatest/explicit2.cc | 4 ++-- src/tgbatest/explicit2.test | 48 +++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100755 src/tgbatest/explicit2.test diff --git a/src/tgbatest/Makefile.am b/src/tgbatest/Makefile.am index 2c68e7ea9..0a2983479 100644 --- a/src/tgbatest/Makefile.am +++ b/src/tgbatest/Makefile.am @@ -78,6 +78,7 @@ TESTS = \ intvcomp.test \ eltl2tgba.test \ explicit.test \ + explicit2.test \ taatgba.test \ tgbaread.test \ neverclaimread.test \ diff --git a/src/tgbatest/explicit2.cc b/src/tgbatest/explicit2.cc index 68668a9fd..8d5c27074 100644 --- a/src/tgbatest/explicit2.cc +++ b/src/tgbatest/explicit2.cc @@ -23,6 +23,7 @@ #include "ltlenv/defaultenv.hh" #include "ltlast/allnodes.hh" +#include "ltlvisit/tostring.hh" #include "tgba/tgbaexplicit.hh" @@ -60,7 +61,6 @@ create_tgba_explicit_number(bdd_dict* d) state_explicit_number* s1 = tgba->add_state(51); state_explicit_number* s2 = tgba->add_state(69); - state_explicit_number::transition* t = tgba->create_transition(s1, s2); (void) t; @@ -96,7 +96,7 @@ create_tgba_explicit_formula(bdd_dict* d, spot::ltl::default_environment& e) for (it->first(); !it->done(); it->next()) { state_explicit_formula* s = it->current_state(); - std::cout << s->label() << std::endl; + to_string(s->label(), std::cout) << std::endl; s->destroy(); } diff --git a/src/tgbatest/explicit2.test b/src/tgbatest/explicit2.test new file mode 100755 index 000000000..5c2a36b47 --- /dev/null +++ b/src/tgbatest/explicit2.test @@ -0,0 +1,48 @@ +#!/bin/sh +# Copyright (C) 2012 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 2 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 Spot; see the file COPYING. If not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +. ./defs + +set -e + +run 0 ../explicit2 >stdout +cat stdout +cat >expected <