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