|
PH Logo
Logo intepreter modeled after UCB Logo.
|
00001 #define BOOST_TEST_MAIN 00002 #include <boost/test/unit_test.hpp> 00003 00004 #include <iostream> 00005 #include <string> 00006 #include <sstream> 00007 #include <algorithm> 00008 #include <iterator> 00009 00010 #include "Thing.h" 00011 #include "Console.h" 00012 #include "World.h" 00013 #include "Interpreter.h" 00014 00015 using namespace std; 00016 using namespace phlogo; 00017 using namespace boost; 00018 00019 BOOST_AUTO_TEST_CASE( suite ) 00020 { 00021 StringConsole c; 00022 World w(&c); 00023 Interpreter itp(&w); 00024 itp.run(&w, "testsuite \"data"); 00025 BOOST_CHECK(!c.isError()); 00026 if (c.isError()) { 00027 cout << c.getString() << endl; 00028 } 00029 BOOST_CHECK_EQUAL(w.getResult()->getWord(), "passed [27]"); 00030 }
1.7.4