Skip to content

Commit

Permalink
rename Type to Type_ for fable
Browse files Browse the repository at this point in the history
  • Loading branch information
caroott committed Oct 8, 2024
1 parent 734b36a commit 28969a4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/CWL/Inputs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Inputs =
DynObj.setOptionalProperty ("type") type_ this
DynObj.setOptionalProperty ("inputBinding") inputBinding this
member this.Name = name
member this.Type = DynObj.tryGetTypedPropertyValue<CWLType> ("type") this
member this.Type_ = DynObj.tryGetTypedPropertyValue<CWLType> ("type") this
member this.InputBinding = DynObj.tryGetTypedPropertyValue<InputBinding> ("inputBinding") this

module Workflow =
Expand Down
2 changes: 1 addition & 1 deletion src/CWL/Outputs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module Outputs =
DynObj.setOptionalProperty ("type") type_ this
DynObj.setOptionalProperty ("outputBinding") outputBinding this
member this.Name = name
member this.Type = DynObj.tryGetTypedPropertyValue<CWLType> ("type") this
member this.Type_ = DynObj.tryGetTypedPropertyValue<CWLType> ("type") this
member this.OutputBinding = DynObj.tryGetTypedPropertyValue<OutputBinding> ("outputBinding") this

module Workflow =
Expand Down
8 changes: 4 additions & 4 deletions tests/CWL/CWLObject.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ let testCWLToolDescription =
"Name of input is not 'firstArg'"
testCase "Type" <| fun _ ->
let expected = File (FileInstance())
let actual = fileItem.Type.Value
let actual = fileItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -101,7 +101,7 @@ let testCWLToolDescription =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = String
let actual = stringItem.Type.Value
let actual = stringItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand Down Expand Up @@ -131,7 +131,7 @@ let testCWLToolDescription =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = Directory (DirectoryInstance())
let actual = directoryItem.Type.Value
let actual = directoryItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -152,7 +152,7 @@ let testCWLToolDescription =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = File (FileInstance())
let actual = fileItem.Type.Value
let actual = fileItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand Down
8 changes: 4 additions & 4 deletions tests/CWL/CWLObjectMetadata.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ let testCWLToolDescriptionMetadata =
"Name of input is not 'firstArg'"
testCase "Type" <| fun _ ->
let expected = File (FileInstance())
let actual = fileItem.Type.Value
let actual = fileItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -102,7 +102,7 @@ let testCWLToolDescriptionMetadata =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = String
let actual = stringItem.Type.Value
let actual = stringItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand Down Expand Up @@ -132,7 +132,7 @@ let testCWLToolDescriptionMetadata =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = Directory (DirectoryInstance())
let actual = directoryItem.Type.Value
let actual = directoryItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -153,7 +153,7 @@ let testCWLToolDescriptionMetadata =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = File (FileInstance())
let actual = fileItem.Type.Value
let actual = fileItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand Down
6 changes: 3 additions & 3 deletions tests/CWL/Inputs.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ let testInput =
testList "Directory" [
let directoryItem = decodeInput.[0]
testCase "Name" <| fun _ -> Expect.isTrue ("arcDirectory" = directoryItem.Name) "Name of input is not 'arcDirectory'"
testCase "Type" <| fun _ -> Expect.isTrue ((Directory (DirectoryInstance())) = directoryItem.Type.Value) "Type of input is not Directory"
testCase "Type" <| fun _ -> Expect.isTrue ((Directory (DirectoryInstance())) = directoryItem.Type_.Value) "Type of input is not Directory"
]
testList "File" [
let fileItem = decodeInput.[1]
testCase "Name" <| fun _ -> Expect.isTrue ("firstArg" = fileItem.Name) "Name of input is not 'firstArg'"
testCase "Type" <| fun _ -> Expect.isTrue ((File (FileInstance())) = fileItem.Type.Value) "Type of input is not File"
testCase "Type" <| fun _ -> Expect.isTrue ((File (FileInstance())) = fileItem.Type_.Value) "Type of input is not File"
testCase "InputBinding" <| fun _ -> Expect.isTrue (Some {Position = Some 1; Prefix = Some "--example"; ItemSeparator = None; Separate = None} = fileItem.InputBinding) "InputBinding of input is not Some Pattern"
]
testList "String" [
let stringItem = decodeInput.[2]
testCase "Name" <| fun _ -> Expect.isTrue ("secondArg" = stringItem.Name) "Name of input is not 'secondArg'"
testCase "Type" <| fun _ ->
let expected = String
let actual = stringItem.Type.Value
let actual = stringItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand Down
10 changes: 5 additions & 5 deletions tests/CWL/Outputs.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let testOutput =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = File (FileInstance())
let actual = fileItem.Type.Value
let actual = fileItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -50,7 +50,7 @@ let testOutput =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = Directory (DirectoryInstance())
let actual = directoryItem.Type.Value
let actual = directoryItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -71,7 +71,7 @@ let testOutput =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = Directory (DirectoryInstance())
let actual = directoryItem.Type.Value
let actual = directoryItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -92,7 +92,7 @@ let testOutput =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = Array (File (FileInstance()))
let actual = fileArrayItem.Type.Value
let actual = fileArrayItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand All @@ -113,7 +113,7 @@ let testOutput =
$"Expected: {expected}\nActual: {actual}"
testCase "Type" <| fun _ ->
let expected = Array (File (FileInstance()))
let actual = fileArrayItem.Type.Value
let actual = fileArrayItem.Type_.Value
Expect.isTrue
(expected = actual)
$"Expected: {expected}\nActual: {actual}"
Expand Down

0 comments on commit 28969a4

Please sign in to comment.