Commit 8269ae9c authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

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.
parent 37a6b601
......@@ -78,6 +78,7 @@ TESTS = \
intvcomp.test \
eltl2tgba.test \
explicit.test \
explicit2.test \
taatgba.test \
tgbaread.test \
neverclaimread.test \
......
......@@ -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();
}
......
#!/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 <<EOF
* TGBA explicit string
tata
* TGBA explicit number
69
* TGBA explicit formula
b
* SBA explicit string, no accepting state
S1 ACCEPTING? 0
S2 ACCEPTING? 0
S3 ACCEPTING? 0
* SBA explicit number, 1 accepting state
S1 ACCEPTING? 1
S2 ACCEPTING? 0
* SBA explicit formula, 1 accepting state
S1 ACCEPTING? 1
S2 ACCEPTING? 0
S3 ACCEPTING? 0
EOF
cmp expected stdout
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