GithubHelp home page GithubHelp logo

tsse_tp3's Introduction

TSSE_TP3

Trabajo práctico N°3 - Testing de software usando Ceedling

tsse_tp3's People

Contributors

roboart avatar

Watchers

 avatar

tsse_tp3's Issues

No se aplicó correctamente la metodología

Una de las reglas de TDD es "escribir el código mínimo y necesario para hacer pasar una prueba unitaria que falla". Para pasar esta prueba

//Revisar parámetros fuera de los limites.
void test_InvalidUpperLimitTurnOnLed(void){
RegistrarMensaje_Expect(ALERTA, "LedTurnOn",0,"Numero de led debe ser entre 1 y 16");
RegistrarMensaje_IgnoreArg_linea();
LedTurnOn(-17);
}

el código mínimo sería

    if(led < LOWER_LIMIT){

y no el que esta en el archivo 'leds.c'

if(led > UPPER_LIMIT || led < LOWER_LIMIT){

Todas las funciones de la biblioteca deben tener un comportamiento uniforme

Si la funciones LedsOn() y LedsOff() no reciben la dirección del puerto como parámetro las dos nuevas funciones LedAllTurnOn () y LedAllTurnOff() tampoco deberían recibirla. Además si la función LedsOn() controla el límite superior del parámetro, entonces también debería controlar el límite inferior (que es 1 y no 0) y además todas las otras funciones de la biblioteca deberían hacer lo mismo, en lo posible sin repetir código y centralizando el control en una función (o macro) interna.

Pienso que estas lineas debería eliminarse

Me parece que estas lineas de código no son necesarias para la prueba y deberían ser eliminadas.

LedTurnOn(11);
LedTurnOn(1);
LedTurnOff(3);

LedTurnOn(11);
LedTurnOn(2);
LedTurnOff(3);

LedTurnOn(2);
LedTurnOn(3);
LedTurnOff(2);

LedTurnOff(2);

LedTurnOn(3);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.