Skip to content
Snippets Groups Projects
Commit 38eacc60 authored by Mathias Chouet's avatar Mathias Chouet
Browse files

Fix #214 (2) update test

parent 7a097ec3
No related branches found
No related tags found
No related merge requests found
...@@ -162,7 +162,7 @@ describe("Class RegimeUniforme / section circulaire :", () => { ...@@ -162,7 +162,7 @@ describe("Class RegimeUniforme / section circulaire :", () => {
}); });
describe("en charge −", () => { describe("en charge −", () => {
it("an error should be thrown if Y > D", () => { // @TODO or >= ? it("an error should be thrown if sectionis circular, Y > D and YB >= D", () => {
const paramSection = new ParamsSectionCirc( const paramSection = new ParamsSectionCirc(
2, // diamètre 2, // diamètre
2.1, // tirant d'eau 2.1, // tirant d'eau
......
...@@ -67,7 +67,11 @@ export class RegimeUniforme extends SectionNub { ...@@ -67,7 +67,11 @@ export class RegimeUniforme extends SectionNub {
} }
// Est-ce qu'on est en charge sur une section circulaire ? @see #214 // Est-ce qu'on est en charge sur une section circulaire ? @see #214
if (this.section instanceof cSnCirc && isGreaterThan(this.section.prms.Y.v, this.section.prms.D.v, 1e-3)) { if (
this.section instanceof cSnCirc
&& this.section.prms.YB.v >= this.section.prms.D.v
&& isGreaterThan(this.section.prms.Y.v, this.section.prms.D.v, 1e-3)
) {
this.currentResult = new Result(new Message(MessageCode.ERROR_RU_CIRC_LEVEL_TOO_HIGH)); this.currentResult = new Result(new Message(MessageCode.ERROR_RU_CIRC_LEVEL_TOO_HIGH));
return this.result; return this.result;
} }
......
...@@ -240,7 +240,7 @@ export enum MessageCode { ...@@ -240,7 +240,7 @@ export enum MessageCode {
*/ */
ERROR_REMOUS_PAS_CALCUL, ERROR_REMOUS_PAS_CALCUL,
/** RegimeUniforme : en charge (le tirant d'eau dépasse le diamètre de la section circulaire) */ /** RegimeUniforme : impossible de calculer avec uen conduite en charge (section circulaire) */
ERROR_RU_CIRC_LEVEL_TOO_HIGH, ERROR_RU_CIRC_LEVEL_TOO_HIGH,
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment