Metria-Project / Metria-Test

0 stars 0 forks source link

suggestion of a test for the method _IntersectionPoint in Line #3

Open cyromd opened 6 years ago

cyromd commented 6 years ago

under this input: lines: This == l This: alfa=(1,0) beta=(2,0) ; l: alfa=(1,0) beta=(2,0) the following output: "The lines intersect in infinty points" is supposed to be seen

under this input: lines: This: alfa=(1,0) beta=(1,0) ; l: alfa=(2,0) beta=(2,0) the following output: null is supposed to be seen

under this input: lines: This : alfa=(1,0) beta=(1,0) ; l: alfa=(0,0) beta=(2,0) the following output: point (1,1) is supposed to be seen

under this input: lines: This : alfa=(1,0) beta=(1,0) ; l: alfa=(1,0) beta=(2,0) the following output: point (1,0) is supposed to be seen

under this input: lines: This : alfa=(1,0) beta=(1,0) ; l: alfa=(2,0) beta=(3,0) the following output: null is supposed to be seen

under this input: lines: l: alfa=(1,0) beta=(1,0) ; this: alfa=(0,0) beta=(2,0) the following output: point (1,1) is supposed to be seen

under this input: lines: l : alfa=(1,0) beta=(1,0) ; this: alfa=(1,0) beta=(2,0) the following output: point (1,0) is supposed to be seen

under this input: lines: l: alfa=(1,0) beta=(1,0) ; this: alfa=(2,0) beta=(3,0) the following output: null is supposed to be seen

under this input: lines: This: alfa=(0,0) beta=(2,0) ; l: alfa=(2,0) beta=(4,0) the following output: point (2,0) is suppsed to be seen

under this input: lines: This: alfa=(-1,0) beta=(1,0) ; l: alfa=(0,0) beta=(2,0) the following output: point (1/2,sqrt(3/4)) is suppsed to be seen

under this input: lines: l: alfa=(0,0) beta=(23,0) ; this: alfa=(23,0) beta=(24,0) the following output: point (23,0) is suppsed to be seen

under this input: lines: l: alfa=(-1,0) beta=(1,0) ; this: alfa=(0,0) beta=(2,0) the following output: point (1/2,sqrt(3/4)) is suppsed to be seen

under this input: lines: This: alfa=(0,0) beta=(2,0) ; l:alfa=(3,0) beta=(4,0) the following output: null is suppsed to be seen

under this input: lines: This: alfa=(4,0) beta=(6,0) ; l:alfa=(-3,0) beta=(-1,0) the following output: null is suppsed to be seen

under this input: lines: This :alfa=(-5,0) beta=(5,0) ; l:alfa=(-1,0) beta=(1,0) the following output: null is suppsed to be seen

under this input: lines: TThis:alfa=(-2,0) beta=(1,0) ; l:alfa=(-4,0) beta=(3,0) the following output: null is suppsed to be seen

Supitto commented 6 years ago

These test are going to be named _7 to _22

Supitto commented 6 years ago

===

Code _7 Place _2_hyperbolic_line.cs Process Create a line from (1,0) to (2,0) and call it l Create a line from (1,0) to (2,0) and call it t Intersect l with t Check Raise a exception

===

Code _8 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it l Create a vertical line with X = 2 and call it t Intersect l with t and call it p Check p == null

===

Code _9 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it l Create a line from (0,0) to (2,0) and call it t Intersect l with t and call it p Check p == new Point(1,1)

===

Code _10 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it t Create a line from (1,0) to (2,0) and call it l Interesect l with t and call it p Check p == new Point(1,0)

===

Code _11 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it l Create a line from (2,0) to (3,0) and call it t Intersect t with l and call it p Check p == null

===

Code _12 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it l Create a line from (0,0) to (2,0) and call it t Intersect l with t and call it p Check p == new Point(1,1)

===

Code _13 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it l Create a line from (1,0) to (2,0) and call it t Intersect l with t and call it p Check p == new Point(1,0)

===

Code _14 Place _2_hyperbolic_line.cs Process Create a vertical line with X = 1 and call it l Create a line from (2,0) to (3,0) and call it t Intersect l with t and call it p Check p == null

===

Code _15 Place _2_hyperbolic_line.cs Process Create a line from (0,0) to (2,0) and call it t Create a line from (2,0) to (4,0) and call it l Intersect t with l and call it p Check p == new Point(2,0)

===

Code _16 Place _2_hyperbolic_line.cs Process Create a line from (-1,0) to (1,0) and call it t Create a line from (0,0) to (2,0) and call it l Intersect l with t and call it p Check p == new Point(1/2,sqrt(3/4))

===

Code _17 Place _2_hyperbolic_line.cs Process Create a line from (0,0) to (23,0) and call it l Create a line from (23,0) to (24,0) and call it t Intersect l with t and call it p Check p == new Point(23,0)

===

Code _18 Place _2_hyperbolic_line.cs Process Create a line from (-1,0) to (1,0) and call it l Create a line from (0,0) to (2,0) and call it t Intersect l with t and call it p Check p == new Point(1/2,sqrt(3/4))

===

Code _19 Place _2_hyperbolic_line.cs Process Create a line from(0,0) to (2,0) and call it t Create a line from(3,0) to (4,0) and call it l Intersect l with t and call it p Check p == null

===

Code _20 Place _2_hyperbolic_line.cs Process Create a line from (4,0) to (6,0) and call it t Create a line from (-3,0) to (-1,0) and call it l Intersect l with t and call it p Check p == null

===

Code _21 Place _2_hyperbolic_line.cs Process Create a line from (-5,0) to (5,0) and call it t Create a line from (-1,0) to (1,0) and call it l Intersect l with t and call it p Check p == null

===

Code _22 Place _2_hyperbolic_line.cs Process Create a line from (-2,0) to (1,0) and call it t Create a line from (-4,0) to (3,0) and call it l Intersect l with t and call it p Check p == null

cyromd commented 6 years ago

No teste 8 o ponto 'esperado' está errado, deveria ser nulo.

cyromd commented 6 years ago

No teste 11 o esperado está errado, o certo seria: esperado = new Point(23,0)

cyromd commented 6 years ago

No teste 18 está faltando uma line, que deveria ser m = new Line(new Point(-9,6),new Point(-4,1))

cyromd commented 6 years ago

No teste 25 a line l e o ponto 'esperado' estão errados, o certo seria: l = new Line(new Point(-5, 0), new Point(-2, 0)) esperad = new point(-2,0)

cyromd commented 6 years ago

OK