diff --git a/conformance_tests.yaml b/conformance_tests.yaml index ee8c0a6..99c3b53 100644 --- a/conformance_tests.yaml +++ b/conformance_tests.yaml @@ -1900,35 +1900,35 @@ tags: [ workflow, shell_command ] - job: tests/io-int.json - output: {"o": 10} + output: {"o": 250} tool: tests/io-int-wf.cwl id: workflow_integer_input doc: Test integer workflow input and outputs tags: [ workflow, inline_javascript, expression_tool ] - job: tests/io-int.json - output: {"o": 10} + output: {"o": 250} tool: tests/io-int-optional-wf.cwl id: workflow_integer_input_optional_specified doc: Test optional integer workflow inputs (specified) tags: [ workflow, inline_javascript, expression_tool ] - job: tests/empty.json - output: {"o": 4} + output: {"o": 16} tool: tests/io-int-optional-wf.cwl id: workflow_integer_input_optional_unspecified doc: Test optional integer workflow inputs (unspecified) tags: [ workflow, inline_javascript, expression_tool ] - job: tests/io-int.json - output: {"o": 10} + output: {"o": 250} tool: tests/io-int-default-wf.cwl id: workflow_integer_input_default_specified doc: Test default integer workflow inputs (specified) tags: [ workflow, inline_javascript, expression_tool ] - job: tests/empty.json - output: {"o": 8} + output: {"o": 128} tool: tests/io-int-default-wf.cwl id: workflow_integer_input_default_unspecified doc: Test default integer workflow inputs (unspecified) diff --git a/tests/io-int-default-wf.cwl b/tests/io-int-default-wf.cwl index fb1bf9b..5a4f225 100644 --- a/tests/io-int-default-wf.cwl +++ b/tests/io-int-default-wf.cwl @@ -9,6 +9,18 @@ inputs: i: type: int default: 4 + i1: + type: int[] + default: [4, 9] + i2: + type: + type: record + fields: + a: + type: int + b: + type: float + default: {"a": 4, "b": 9.0} outputs: o: @@ -19,14 +31,26 @@ steps: step1: in: i: i + i1: i1 + i2: i2 out: [o] run: class: ExpressionTool inputs: i: type: int + i1: + type: int[] + i2: + type: + type: record + fields: + a: + type: int + b: + type: float outputs: o: type: int expression: > - ${return {'o': (inputs.i || 2) * 2};} + ${return {'o': (inputs.i || 2) * ((inputs.i1 != null && inputs.i1.length > 0) ? inputs.i1[0] : 2) * ((inputs.i2 != null) ? inputs.i2.a : 2) * 2};} diff --git a/tests/io-int-optional-wf.cwl b/tests/io-int-optional-wf.cwl index bc8a279..93915ec 100644 --- a/tests/io-int-optional-wf.cwl +++ b/tests/io-int-optional-wf.cwl @@ -8,6 +8,17 @@ requirements: inputs: i: type: int? + i1: + type: int[]? + i2: + type: + - "null" + - type: record + fields: + a: + type: int + b: + type: float outputs: o: @@ -18,14 +29,27 @@ steps: step1: in: i: i + i1: i1 + i2: i2 out: [o] run: class: ExpressionTool inputs: i: type: int? + i1: + type: int[]? + i2: + type: + - "null" + - type: record + fields: + a: + type: int + b: + type: float outputs: o: type: int expression: > - ${return {'o': (inputs.i || 2) * 2};} + ${return {'o': (inputs.i || 2) * ((inputs.i1 != null && inputs.i1.length > 0) ? inputs.i1[0] : 2) * ((inputs.i2 != null) ? inputs.i2.a : 2) * 2};} diff --git a/tests/io-int-wf.cwl b/tests/io-int-wf.cwl index 4fdac80..92236eb 100644 --- a/tests/io-int-wf.cwl +++ b/tests/io-int-wf.cwl @@ -8,7 +8,17 @@ requirements: inputs: i: type: int - + i1: + type: int[] + i2: + type: + type: record + fields: + a: + type: int + b: + type: float + outputs: o: type: int @@ -18,14 +28,26 @@ steps: step1: in: i: i + i1: i1 + i2: i2 out: [o] run: class: ExpressionTool inputs: i: type: int + i1: + type: int[] + i2: + type: + type: record + fields: + a: + type: int + b: + type: float outputs: o: type: int expression: > - ${return {'o': inputs.i * 2};} + ${return {'o': inputs.i * ((inputs.i1.length > 0) ? inputs.i1[0] : 2) * inputs.i2.a * 2};} diff --git a/tests/io-int.json b/tests/io-int.json index 6e0326a..3d5d1c9 100644 --- a/tests/io-int.json +++ b/tests/io-int.json @@ -1 +1 @@ -{"i": 5} +{"i": 5, "i1": [5, 2], "i2": {"a": 5, "b": 2.0}}