Пример #1
0
 def testIngresaListaDeCadenaDeCaracteresCorrectaSinPosicionesDeDisparosDevuelveRespuestaCorrecta(
         self):
     n = ["b..", "...", "..b"]
     posicionesDeDisparosDePrueba = []
     resultado = ejercicio2.batallaDeBotes(n, posicionesDeDisparosDePrueba)
     self.assertEqual(resultado, [(1, 1), (3, 3)])
Пример #2
0
 def testIngresaListaVaciaDevuelveListaVacia(self):
     n = []
     posicionesDeDisparosDePrueba = [(1, 1), (3, 4), (1, 3), (4, 5)]
     resultado = ejercicio2.batallaDeBotes(n, posicionesDeDisparosDePrueba)
     self.assertEqual(resultado, [])
Пример #3
0
 def testIngresaListaDeCadenaDeCaracteresInvalidosDevuelveListaVacia(self):
     n = ["yo", "tambien", "soy", "invalido"]
     posicionesDeDisparosDePrueba = [(1, 1), (3, 4), (1, 3), (4, 5)]
     resultado = ejercicio2.batallaDeBotes(n, posicionesDeDisparosDePrueba)
     self.assertEqual(resultado, [])
Пример #4
0
 def testIngresaListaDeCadenaDeCaracteresConDistintoLargoDevuelveListaVacia(
         self):
     n = ["b.b.", "....", "..bb", "b.b"]
     posicionesDeDisparosDePrueba = [(1, 1), (3, 4), (1, 3), (4, 5)]
     resultado = ejercicio2.batallaDeBotes(n, posicionesDeDisparosDePrueba)
     self.assertEqual(resultado, [])
Пример #5
0
 def testIngresaCadenaDeCaracteresCompuestaPorEspacioDevuelveListaVacia(
         self):
     n = "      "
     posicionesDeDisparosDePrueba = [(1, 1), (3, 4), (1, 3), (4, 5)]
     resultado = ejercicio2.batallaDeBotes(n, posicionesDeDisparosDePrueba)
     self.assertEqual(resultado, [])