mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-07 07:59:37 +02:00
ingsw: Add 07-22
This commit is contained in:
parent
9c7b4e10a5
commit
3b6c7b4377
104 changed files with 520 additions and 0 deletions
1
Ingegneria del Software/0722_16/correct.txt
Normal file
1
Ingegneria del Software/0722_16/correct.txt
Normal file
|
@ -0,0 +1 @@
|
|||
100%
|
17
Ingegneria del Software/0722_16/quest.txt
Normal file
17
Ingegneria del Software/0722_16/quest.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
Il branch coverage di un insieme di test cases è la percentuale di branch del programma che sono attraversati da almeno un test case.
|
||||
|
||||
Si consideri la seguente funzione C:
|
||||
|
||||
-----------
|
||||
|
||||
int f(int x, int y) {
|
||||
|
||||
if (x - y <= 0) { if (x + y >= 2) return (1); else return (2); }
|
||||
|
||||
else {if (2*x + y >= 1) return (3); else return (4); }
|
||||
|
||||
} /* f() */
|
||||
|
||||
Si considerino i seguenti test cases: {x=1, y=1}, {x=0, y=0}, {x=1, y=0}, {x=0, y=-1}.
|
||||
|
||||
Quale delle seguenti è la branch coverage conseguita?
|
1
Ingegneria del Software/0722_16/wrong 1.txt
Normal file
1
Ingegneria del Software/0722_16/wrong 1.txt
Normal file
|
@ -0,0 +1 @@
|
|||
50%
|
1
Ingegneria del Software/0722_16/wrong 2.txt
Normal file
1
Ingegneria del Software/0722_16/wrong 2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
80%
|
Loading…
Add table
Add a link
Reference in a new issue