|
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 #include "Turtle.h" 00009 00010 using namespace std; 00011 using namespace phlogo; 00012 00013 BOOST_AUTO_TEST_CASE( suite ) 00014 { 00015 JSONTurtle t; 00016 StringConsole c; 00017 World w(&c); 00018 w.setTurtle(&t); 00019 Interpreter itp(&w); 00020 itp.run(&w, "testsuite \"graph"); 00021 BOOST_CHECK(!c.isError()); 00022 if (c.isError()) { 00023 cout << c.getString() << endl; 00024 } 00025 BOOST_CHECK_EQUAL(w.getResult()->getWord(), "passed [32]"); 00026 }
1.7.4