ember/test/StateManagerTest.cpp
Martin Pollard 14975fff9e 2002-11-11 M Pollard <circlemaster@blueyonder.co.uk>
* StateManager.cpp, StateManager.h: Begun work on new format here.

        * StateManagerTest.cpp: Fixed this up so that it should work now,
          however I haven't readded it to the build as I want to complete
          StateManager first.

        * configure.ac: made cppunit default on but given ability to turn off;
                        added libxml2.
2002-11-11 15:41:27 +00:00

62 lines
1.4 KiB
C++

/*
Copyright (C) 2002 Martin Pollard aka Xmp
This program 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.
This program 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, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef USE_CPP_UNIT
#include "StateManagerTest.h"
#include "framework/Exception.h"
namespace dime
{
void StateManagerTestCase::testFindStateNonExistant()
{
bool bFailedToFindNonExistant = false;
//try to find a nonexistant state
try
{
mySM->existsState("testdontmakestatecalledthis");
}
catch(Exception &)
{
bFailedToFindNonExistant = true;
}
CPPUNIT_ASSERT(bFailedToFindNonExistant == true);
}
void StateManagerTestCase::testFindStateLegal()
{
}
void StateManagerTestCase::setUp ()
{
mySM = new StateManager("states.xml");
CPPUNIT_ASSERT (mySM != NULL);
}
void StateManagerTestCase::tearDown()
{
delete mySM;
}
}
#endif