Trabajo práctico N°3 - Testing de software usando Ceedling
roboart / tsse_tp3 Goto Github PK
View Code? Open in Web Editor NEWTrabajo práctico N°3 - Testing de software usando Ceedling
License: Creative Commons Zero v1.0 Universal
Trabajo práctico N°3 - Testing de software usando Ceedling
License: Creative Commons Zero v1.0 Universal
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
TSSE_TP3/leds/test/test_leds.c
Lines 86 to 91 in 2753bf1
el código mínimo sería
if(led < LOWER_LIMIT){
y no el que esta en el archivo 'leds.c'
Line 23 in 2753bf1
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.
En esta linea se debería llamar a la función LedTurnOffAll()
en lugar de repetir la asignación de valores a la variable.
Line 19 in 2753bf1
Me parece que estas lineas de código no son necesarias para la prueba y deberían ser eliminadas.
TSSE_TP3/leds/test/test_leds.c
Lines 48 to 50 in 2753bf1
TSSE_TP3/leds/test/test_leds.c
Lines 57 to 59 in 2753bf1
TSSE_TP3/leds/test/test_leds.c
Lines 68 to 70 in 2753bf1
TSSE_TP3/leds/test/test_leds.c
Line 78 in 2753bf1
TSSE_TP3/leds/test/test_leds.c
Line 80 in 2753bf1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.