Exemplo n.º 1
0
Arquivo: test.py Projeto: bazerk/katas
    def test_crashed_robots_dont_move(self):
        input = \
"""2 2
0 0 W
FRRFF"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 0 W'])
Exemplo n.º 2
0
Arquivo: test.py Projeto: bazerk/katas
    def test_robots_move_x_and_y(self):
        input = \
"""5 3
2 0 E
RRFFRFF"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 2 N'])
Exemplo n.º 3
0
Arquivo: test.py Projeto: bazerk/katas
    def test_robots_dont_move(self):
        input = \
"""5 3
0 0 E

0 0 E
"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 0 E', '0 0 E'])
Exemplo n.º 4
0
Arquivo: test.py Projeto: bazerk/katas
    def test_scent_markers(self):
        input = \
"""2 2
0 0 W
FR
0 0 W
FR"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 0 W', '0 0 N'])
Exemplo n.º 5
0
Arquivo: test.py Projeto: bazerk/katas
    def test_robots_spin_and_move(self):
        input = \
"""5 3
2 0 E
RRFF
2 0 E
LLFF"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 0 W', '0 0 W'])
Exemplo n.º 6
0
Arquivo: test.py Projeto: bazerk/katas
    def test_robots_spin(self):
        input = \
"""5 3
0 0 E
RR
0 0 E
LL"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 0 W', '0 0 W'])
Exemplo n.º 7
0
Arquivo: test.py Projeto: bazerk/katas
    def test_robots_move_east(self):
        input = \
"""5 3
0 0 E
F
0 0 E
FF"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['1 0 E', '2 0 E'])
Exemplo n.º 8
0
Arquivo: test.py Projeto: bazerk/katas
    def test_crash_robot(self):
        input = \
"""2 2
0 0 W
F
0 0 S
F
2 0 E
F
0 2 N
F"""
        positions = calculate_positions(input)
        self.assertEqual(positions, ['0 0 W', '0 0 S', '2 0 E', '0 2 N'])