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