Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
L3 - Projet programmation 2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
v-lafeychine
L3 - Projet programmation 2
Commits
e501daaf
Commit
e501daaf
authored
3 years ago
by
phenixceleste
Browse files
Options
Downloads
Patches
Plain Diff
tests completed for all interaction between types
parent
15276be5
No related branches found
No related tags found
1 merge request
!5
Resolve "Type class"
Pipeline
#9670
failed with stage
in 1 minute and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/scala/Test.scala
+10
-2
10 additions, 2 deletions
src/test/scala/Test.scala
with
10 additions
and
2 deletions
src/test/scala/Test.scala
+
10
−
2
View file @
e501daaf
...
...
@@ -4,9 +4,17 @@ import org.scalatest.funsuite.AnyFunSuite
class
StackSpec
extends
AnyFunSuite
:
test
(
"
Strong
type
should
have
increased
damage
multiplicator
"
)
{
assert
(
Fire.
type
Efficiency
(
Grass
)
==
2
)
assert
(
Fire.
type
Efficiency
(
Grass
)
.fatcor
==
2
.
0
)
}
test
(
"Weak type should have decreased damage multiplicator"
)
{
assert
(
Fire
.
computeMultiplier
(
Water
)
==
0.5
)
assert
(
Bug
.
typeEfficiency
(
Fight
).
factor
==
0.5
)
}
test
(
"Common type should have neutral damage multiplicator"
)
{
assert
(
Electric
.
typeEfficiency
(
Poison
).
factor
==
1.0
)
}
test
(
"Inefficient type should have null damage multiplicator"
)
{
assert
(
Normal
.
typeEfficiency
(
Ghost
).
factor
==
0.0
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment