Commit 9c05004b authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

updated test on multiple variated parameters

Showing with 3 additions and 1 deletion
+3 -1
...@@ -29,7 +29,7 @@ function createLinkedNubEnv() { ...@@ -29,7 +29,7 @@ function createLinkedNubEnv() {
* @param sort if true, list will be ordered * @param sort if true, list will be ordered
*/ */
function randomList( function randomList(
refVal: number, minSize: number = 1, maxSize: number = 20, maxDev: number = 3, sort: boolean = true refVal: number, minSize: number = 2, maxSize: number = 20, maxDev: number = 3, sort: boolean = true
): number[] { ): number[] {
let list: number[] = []; let list: number[] = [];
const size = minSize + Math.floor(Math.random() * ((maxSize - minSize) + 1)); // between minSize and maxSize const size = minSize + Math.floor(Math.random() * ((maxSize - minSize) + 1)); // between minSize and maxSize
...@@ -147,6 +147,7 @@ describe("multiple variated parameters - ", () => { ...@@ -147,6 +147,7 @@ describe("multiple variated parameters - ", () => {
if (p.visible) { if (p.visible) {
if (! sparedParam) { if (! sparedParam) {
sparedParam = p; sparedParam = p;
nub1.calculatedParam = p;
} else { } else {
const rl = randomList(p.singleValue); const rl = randomList(p.singleValue);
longest = Math.max(longest, rl.length); longest = Math.max(longest, rl.length);
...@@ -269,6 +270,7 @@ describe("multiple variated parameters - ", () => { ...@@ -269,6 +270,7 @@ describe("multiple variated parameters - ", () => {
if (p.visible) { if (p.visible) {
if (! sparedParam) { if (! sparedParam) {
sparedParam = p; sparedParam = p;
nub1.calculatedParam = p;
} else { } else {
const rl = randomList(p.singleValue); const rl = randomList(p.singleValue);
longest = Math.max(longest, rl.length); longest = Math.max(longest, rl.length);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment