Home



Ga Terug




Vergelijk output

Creëer data


Gebruik uitvoer



Voorbeelden


Elementary Comparison Test - example 3

Elementary Comparison Test

 

Condition(s)

if x=0 and (y<1 or z=12)

then

  put "GREEN" into prediction

else

  if k=5 and l>4 and not ( m=10)

  then

    put "ORANGE" into prediction

  else

    put "RED" into prediction

  end if

end if

 

 

Physical Values

x=-1,0,1

y=-10,0,1,10

z=11,12,13

k=-1,4,5,6

l=3,4,5

m=-100,-10,0,10

 

Equations

A: x=0

B: y<1

C: z=12

D: k=5

E: l>4

F: m=10

 

Test situations

 

GREEN

ORANGE

A

101000

001110

B

110000

100110

C

101000

100110

D

 

100110

E

 

100110

F

 

100110

 

 

RED

 

A

001010

 

B

100010

 

C

100010

 

D

100010

 

E

000100

 

F

000111

 

 

 

Test Cases

 Test Case

1

2

3

     test situation

101000(*)

110000(*)

001110

     prediction

GREEN

GREEN

ORANGE

     determines outcome

AC

AB

ADEF

 

A: x

0 (x=0)

0 (x=0)

-1 (x<>0)

B: y

1 (y>=1)

-10 (y<1)

10 (y>=1)

C: z

12 (z=12)

11 (z<>12)

12 (z=12)

D: k

-1 (k<>5)

4 (k<>5)

5 (k=5)

E: l

3 (l<=4)

4 (l<=4)

5 (l>4)

F: m

-100 (m<>10)

-10 (m<>10)

0 (m<>10)

 

 

 Test Case

4

5

6

     test situation

100110(*)

001010(*)

100010

     prediction

ORANGE

RED

RED

     determines outcome

BCDEF

AD

BCD

 

A: x

0 (x=0)

1 (x<>0)

0 (x=0)

B: y

1 (y>=1)

10 (y>=1)

1 (y>=1)

C: z

13 (z<>12)

12 (z=12)

11 (z<>12)

D: k

5 (k=5)

6 (k<>5)

-1 (k<>5)

E: l

5 (l>4)

5 (l>4)

5 (l>4)

F: m

-100 (m<>10)

-10 (m<>10)

0 (m<>10)

 

 

 Test Case

7

8

 

     test situation

000100(*)

000111(*)

 

     prediction

RED

RED

 

     determines outcome

E

F

 

 

A: x

-1 (x<>0)

1 (x<>0)

 

B: y

10 (y>=1)

1 (y>=1)

 

C: z

13 (z<>12)

11 (z<>12)

 

D: k

5 (k=5)

5 (k=5)

 

E: l

3 (l<=4)

5 (l>4)

 

F: m

-100 (m<>10)

10 (m=10)

 

 

 

(*)=minimum testset: all equations from both true and false situation once determine the outcome.