Skip to content

Commit dc7c03d

Browse files
committed
test for #457
1 parent 4ebb3e6 commit dc7c03d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/test/java/org/commonwl/view/cwl/CWLServiceTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ public void parseLobSTRv1WorkflowNative() throws Exception {
133133
Paths.get("src/test/resources/cwl/lobstr-v1/lobSTR-workflow.cwl"), null);
134134
testLobSTRWorkflow(lobSTRv1, true);
135135
}
136+
137+
/**
138+
* Test native loading parsing of optional inline types
139+
*/
140+
@Test
141+
public void parseWorkflowInlineOptionalTypesNative() throws Exception {
142+
CWLService cwlService = new CWLService(rdfService, new CWLTool(), 5242880);
143+
Workflow wkflow = cwlService.parseWorkflowNative(
144+
Paths.get("src/test/resources/cwl/oneline_optional_types.cwl"), null);
145+
assertEquals(wkflow.getInputs().get("qualified_phred_quality").getType(), "int?");
146+
assertEquals(wkflow.getInputs().get("ncrna_tab_file").getType(), "File?");
147+
assertEquals(wkflow.getInputs().get("reverse_reads").getType(), "File?");
148+
149+
}
136150

137151
/**
138152
* Test parsing of a workflow using cwltool
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cwlVersion: v1.0
2+
class: Workflow
3+
4+
inputs:
5+
ncrna_tab_file: {type: File?}
6+
reverse_reads: File?
7+
qualified_phred_quality: { type: int? }
8+
9+
steps: []
10+
11+
outputs: []

0 commit comments

Comments
 (0)