class TestBrainFuckInterpreter(unittest.TestCase): def setUp(self): self.bf = BrainFuckInterpreter() def test_hello_world(self): hello_world = "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." self.assertEqual(self.bf.execute(hello_world), "Hello World!\n")
def setUp(self): self.bf = BrainFuckInterpreter()