Example #1
0
 def test_should_print_c_and_a(self):
     instructions = (
         "+++++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++-++++++++."
         ">++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++++++++++."
     )
     stdout = brainfuck(instructions)
     self.assertEqual(stdout, "CA")
Example #2
0
 def test_should_return_a(self):
     instructions = "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++."
     stdout = brainfuck(instructions)
     self.assertEqual(stdout, "A")
Example #3
0
 def test_should_return_a_when_decrement(self):
     instructions = "+++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++-++++++++."
     stdout = brainfuck(instructions)
     self.assertEqual(stdout, "A")