Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jalhyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
jalhyd
Commits
6469d678
Commit
6469d678
authored
4 years ago
by
Dorchies David
Browse files
Options
Downloads
Patches
Plain Diff
test: Debug add Cunge80 in Cloisons
Refs
#220
parent
0bf3e568
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spec/pab/cloisons.spec.ts
+3
-2
3 additions, 2 deletions
spec/pab/cloisons.spec.ts
spec/structure/functions.ts
+6
-4
6 additions, 4 deletions
spec/structure/functions.ts
with
9 additions
and
6 deletions
spec/pab/cloisons.spec.ts
+
3
−
2
View file @
6469d678
import
{
CreateStructure
,
LoiDebit
,
MessageCode
,
Session
}
from
"
../../src/index
"
;
import
{
CreateStructure
,
MessageCode
,
Session
}
from
"
../../src/index
"
;
import
{
LoiDebit
}
from
"
../../src/structure/structure_props
"
;
import
{
Cloisons
}
from
"
../../src/pab/cloisons
"
;
import
{
CloisonsParams
}
from
"
../../src/pab/cloisons_params
"
;
import
{
RectangularStructureParams
}
from
"
../../src/structure/rectangular_structure_params
"
;
...
...
@@ -52,7 +53,7 @@ describe("Class Cloisons: ", () => {
});
describe
(
"
testPS
"
,
()
=>
{
testParallelStructures
(
CreateParalleleStructureTest
(
getEmptyCloisonsTest
()));
testParallelStructures
(
CreateParalleleStructureTest
(
getEmptyCloisonsTest
()
,
[
LoiDebit
.
GateCunge80
]
));
});
describe
(
"
Exemple Formation Cassiopée 2018-09
"
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
spec/structure/functions.ts
+
6
−
4
View file @
6469d678
...
...
@@ -7,7 +7,7 @@ import { Result } from "../../src/util/result";
import
{
precDigits
}
from
"
../test_config
"
;
import
{
checkResult
}
from
"
../test_func
"
;
export
function
CreateParalleleStructureTest
(
parallelStructure
:
ParallelStructure
):
export
function
CreateParalleleStructureTest
(
parallelStructure
:
ParallelStructure
,
exceptLoiDebit
?:
LoiDebit
[]
):
{
ps
:
ParallelStructure
,
ld
:
number
[]}
{
// Ajout d'une structure de chaque type dans ParallelStructure
const
loiDebits
:
number
[]
=
[];
...
...
@@ -16,8 +16,10 @@ export function CreateParalleleStructureTest(parallelStructure: ParallelStructur
const
loiAdmStruct
=
loisAdmissibles
[
StructureType
[
s
]];
if
(
loiAdmStruct
!==
undefined
)
{
for
(
const
la
of
loiAdmStruct
)
{
parallelStructure
.
addChild
(
CreateStructure
(
la
,
parallelStructure
,
false
));
loiDebits
.
push
(
la
);
if
(
exceptLoiDebit
===
undefined
||
!
exceptLoiDebit
.
includes
(
la
))
{
parallelStructure
.
addChild
(
CreateStructure
(
la
,
parallelStructure
,
false
));
loiDebits
.
push
(
la
);
}
}
}
}
...
...
@@ -189,7 +191,7 @@ export function testParallelStructures(o: { ps: ParallelStructure, ld: number[]
}
else
{
// Cas normal : On teste la valeur calculée
if
(
ParamCalculability
.
DICHO
===
prm
.
calculability
)
{
f
it
(
`should return
${
ref
}
`
,
()
=>
{
it
(
`should return
${
ref
}
`
,
()
=>
{
// console.log(o.ps.serialise());
checkResult
(
o
.
ps
.
CalcSerie
(),
ref
);
/* checkResult(o.ps.Calc({
...
...
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