Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tomas MARTINEAU
Projet Particules
Commits
593b5dc7
Commit
593b5dc7
authored
Jan 20, 2022
by
jonathan boulay
Browse files
enlever les fmt
parent
de26c3da
Changes
1
Hide whitespace changes
Inline
Side-by-side
particles/particles_test.go
View file @
593b5dc7
package
particles
import
(
"project-particles/config"
"testing"
"fmt"
)
"testing"
)
// Cette function test si NewSystem génére 0 particule
...
...
@@ -85,7 +84,6 @@ func TestAdd2(t*testing.T){
if
len
(
S
.
Content
)
!=
30
{
t
.
Fail
()
fmt
.
Println
(
len
(
S
.
Content
))
}
}
...
...
@@ -134,7 +132,6 @@ func TestAdd4(t*testing.T){
if
len
(
S
.
Content
)
!=
1
{
t
.
Fail
()
fmt
.
Println
(
len
(
S
.
Content
))
}
}
...
...
@@ -160,7 +157,6 @@ func TestVitesse(t*testing.T){
S
.
Update
()
if
v1
==
S
.
Content
[
0
]
.
PositionX
||
v2
==
S
.
Content
[
0
]
.
PositionY
{
t
.
Fail
()
fmt
.
Println
(
v1
,
S
.
Content
[
0
]
.
PositionX
)
}
}
}
...
...
@@ -181,7 +177,6 @@ func TestAleatoirePosition_Ecran(t*testing.T){
if
S
.
Content
[
0
]
.
PositionX
<
0
||
S
.
Content
[
0
]
.
PositionX
>
float64
(
config
.
General
.
WindowSizeX
)
||
S
.
Content
[
0
]
.
PositionY
<
0
||
S
.
Content
[
0
]
.
PositionY
>
float64
(
config
.
General
.
WindowSizeY
){
t
.
Fail
()
// fmt.Println(S.Content[0].PositionX)
}
}
}
...
...
@@ -234,7 +229,6 @@ func TestMort(t *testing.T){
if
S
.
Content
[
0
]
.
PositionX
!=
posX
||
S
.
Content
[
0
]
.
PositionY
!=
posY
{
t
.
Fail
()
fmt
.
Println
(
posX
,
posY
,
S
.
Content
[
0
]
.
PositionX
,
S
.
Content
[
0
]
.
PositionY
,
S
.
Content
[
0
]
.
Dureevie
,
S
.
Content
[
0
]
.
Death
)
}
}
...
...
@@ -261,7 +255,6 @@ func TestGravite(t *testing.T){
if
posY
==
S
.
Content
[
0
]
.
PositionY
{
t
.
Fail
()
fmt
.
Println
(
posY
,
S
.
Content
[
0
]
.
PositionY
)
}
}
}
...
...
@@ -292,12 +285,10 @@ func TestLimite(t *testing.T){
S
.
Update
()
if
particulebefore
.
PositionX
!=
S
.
Content
[
0
]
.
PositionX
{
t
.
Fail
()
fmt
.
Println
(
particulebefore
.
PositionX
,
S
.
Content
[
0
]
.
PositionX
,
"X"
)
}
if
particulebefore
.
PositionY
!=
S
.
Content
[
0
]
.
PositionY
{
t
.
Fail
()
fmt
.
Println
(
particulebefore
.
PositionY
,
S
.
Content
[
0
]
.
PositionY
,
"Y"
)
}
}
...
...
@@ -327,7 +318,6 @@ func TestRebondis(t *testing.T){
if
S
.
Content
[
j
]
.
PositionX
>
float64
(
config
.
General
.
WindowSizeX
)
||
S
.
Content
[
j
]
.
PositionY
>
float64
(
config
.
General
.
WindowSizeY
)
||
S
.
Content
[
j
]
.
PositionX
<
0
||
S
.
Content
[
j
]
.
PositionY
<
0
{
t
.
Fail
()
fmt
.
Println
(
S
.
Content
[
j
]
.
PositionX
,
S
.
Content
[
j
]
.
PositionY
,
j
)
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment