diff --git a/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs b/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs index 474b53d02..549a627a0 100644 --- a/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs +++ b/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs @@ -253,6 +253,17 @@ let ``ApiDocs works on two sample F# assemblies`` (format: OutputFormat) = files.[(sprintf "fslib-union.%s" format.Extension)] |> shouldContainText "Naming(rate, string)" + // Check that operators are encoded + files[(sprintf "fslib-operatorswithfsi.%s" format.Extension)] + |> shouldContainText "<&>" + + // Check that parameters are indexed + files[(sprintf "fslib-operatorswithfsi.%s" format.Extension)] + |> shouldContainText "arg0" + + files[(sprintf "fslib-operatorswithfsi.%s" format.Extension)] + |> shouldContainText "arg1" + (* This may be addressed in a separate issue or removed if not an issue. // Check that implict cast operator is generated correctly files.[(sprintf "fslib-space-missing-implicit-cast.%s" format.Extension)] |> shouldContainText "op_Implicit source" diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib1/FsLib1.fsproj b/tests/FSharp.ApiDocs.Tests/files/FsLib1/FsLib1.fsproj index f2882b7e6..b709c46f4 100644 --- a/tests/FSharp.ApiDocs.Tests/files/FsLib1/FsLib1.fsproj +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib1/FsLib1.fsproj @@ -6,6 +6,8 @@ + + diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fs b/tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fs new file mode 100644 index 000000000..0c63a50bc --- /dev/null +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fs @@ -0,0 +1,4 @@ +module FsLib.OperatorsWithFsi + +let (<&>) (x: 'T) (y: 'T) = x < y + diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fsi b/tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fsi new file mode 100644 index 000000000..5f2486a08 --- /dev/null +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fsi @@ -0,0 +1,5 @@ +module FsLib.OperatorsWithFsi + +/// The operator +val ( <&> ) : 'T -> 'T -> bool when 'T : comparison +