WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1d13c8b
flat list - first set of missing array APIs
rokklobster May 19, 2021
f2b637d
flat list - fix mapFold(+Back) and for loops
rokklobster May 19, 2021
f68ab1c
flat list - add unzip
rokklobster May 19, 2021
96466f7
flat list - find index, unfold, remove excessions
rokklobster May 19, 2021
6ce003b
flat list - another changes pack
rokklobster May 19, 2021
515f913
flat list - exactlyOne + try
rokklobster May 19, 2021
82dbf1d
flat-list - post-review fixes for first half
rokklobster May 20, 2021
b5dc6df
flat list - fix sorting (and helpers)
rokklobster May 20, 2021
3b9c912
general: vscode build task, move common funcs
rokklobster May 20, 2021
3cc77b1
flat list - remove sortInPlace*
rokklobster May 20, 2021
b200e5c
flat list - all APIs ported
rokklobster May 20, 2021
bbf1366
flat list - post-review fixes
rokklobster May 20, 2021
0ee37d5
flat list - update signatures: force main arg as FlatList
rokklobster May 20, 2021
697c5f8
flat-list - changes
rokklobster May 21, 2021
8af69b9
flat list - fix minor issues
rokklobster May 21, 2021
452bfb9
flat list - final post-review changes
rokklobster May 21, 2021
119b224
flat list tests - first pack
rokklobster May 24, 2021
49414df
flat list tests - fix invocation
rokklobster May 24, 2021
c020a36
add compiled name annotations
rokklobster Jun 8, 2021
c0d8313
fixes upon review
rokklobster Jun 22, 2021
b4f11a1
Merge branch 'feature/collection-methods' into feature/tests/flat-list
rokklobster Jun 22, 2021
64bd4ea
tests pack
rokklobster Jun 22, 2021
7be62fe
fix tests (remove dependency on same instance of lists), tests for se…
rokklobster Jun 28, 2021
d232b99
more tests
rokklobster Jul 12, 2021
3f80dad
more tests
rokklobster Jul 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FsUnit" Version="4.0.4" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
</ItemGroup>

<ItemGroup>
<Compile Include="test-helpers.fs" />
<Compile Include="flat-list-tests.fs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\FSharp.Collections.Immutable\FSharp.Collections.Immutable.fsproj" />
</ItemGroup>

</Project>
156 changes: 156 additions & 0 deletions FSharp.Collections.Immutable.Tests/flat-list-tests.fs

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions FSharp.Collections.Immutable.Tests/test-helpers.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace FSharp.Collections.Immutable.Tests

open FsUnit
open NUnit.Framework

[<AutoOpen>]
module TestHelpers =
let appliedTo value func = fun () -> func value
let appliedToFunc value func = fun () -> func (value ())
let produces value func = fun () -> () |> func |> should equal value
let producesEquivalentOf value func = fun () -> () |> func |> should equivalent value
let producesSameAs value func = fun () -> () |> func |> Seq.fold2 (fun acc x y -> acc && (x = y)) true value |> should equal true
let throws func = fun () -> Assert.Catch (func >> ignore) |> ignore
let doesNotThrow func = fun () -> func () |> ignore |> should equal ()
let noopPredicate _ = true
let ignore2 _ _ = ()
let ignore3 _ _ _ = ()
let testCase name category (code:unit->unit) = ((TestCaseData code).SetName (category + " - " + name)).SetCategory category
let withSecondArg a f = fun b -> f b a
let withSecondArgFrom a f = fun b -> f b (a ())
6 changes: 6 additions & 0 deletions FSharp.Collections.Immutable.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\workflows\publish_release.yml = .github\workflows\publish_release.yml
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Collections.Immutable.Tests", "FSharp.Collections.Immutable.Tests\FSharp.Collections.Immutable.Tests.fsproj", "{2272CACE-DBCE-4BC8-BADD-11802BAF30EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{9805E74C-D028-4D05-9256-5C2FDC9B6EA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9805E74C-D028-4D05-9256-5C2FDC9B6EA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9805E74C-D028-4D05-9256-5C2FDC9B6EA8}.Release|Any CPU.Build.0 = Release|Any CPU
{2272CACE-DBCE-4BC8-BADD-11802BAF30EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2272CACE-DBCE-4BC8-BADD-11802BAF30EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2272CACE-DBCE-4BC8-BADD-11802BAF30EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2272CACE-DBCE-4BC8-BADD-11802BAF30EC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Description>F# bindings for System.Collections.Immutable</Description>
<Copyright>Copyright © XperiAndri 2016</Copyright>
<AssemblyTitle>FSharp.Collections.Immutable</AssemblyTitle>
<Company>XperiAndri</Company>
<ProductName>FSharp.Collections.Immutable</ProductName>
<Version>2.0.0</Version>
<Authors>XperiAndri;EventHelix;vilinski;anthony-mi;dim-37</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>FSharp.Collections.Immutable</PackageId>
<PackageTags>System;Immutable;Collections;FSharp;F#</PackageTags>
<RepositoryType>git</RepositoryType>
<DebugType>embedded</DebugType>
<RepositoryUrl>https://github.com/fsprojects/FSharp.Collections.Immutable/</RepositoryUrl>
<PackageProjectUrl>https://github.com/fsprojects/FSharp.Collections.Immutable/</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup>
<Compile Include="immutable-collection-util.fs" />
<Compile Include="flat-list.fs" />
<Compile Include="stack.fs" />
<Compile Include="immutable-list.fs" />
<Compile Include="queue.fs" />
<Compile Include="indexed-seq.fs" />
<Compile Include="maps.fs" />
<Compile Include="sets.fs" />
<Compile Include="seq.fs" />
</ItemGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Description>F# bindings for System.Collections.Immutable</Description>
<Copyright>Copyright © XperiAndri 2016</Copyright>
<AssemblyTitle>FSharp.Collections.Immutable</AssemblyTitle>
<Company>XperiAndri</Company>
<ProductName>FSharp.Collections.Immutable</ProductName>
<Version>2.0.0</Version>
<Authors>XperiAndri;EventHelix;vilinski;anthony-mi;dim-37</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>FSharp.Collections.Immutable</PackageId>
<PackageTags>System;Immutable;Collections;FSharp;F#</PackageTags>
<RepositoryType>git</RepositoryType>
<DebugType>embedded</DebugType>
<RepositoryUrl>https://github.com/fsprojects/FSharp.Collections.Immutable/</RepositoryUrl>
<PackageProjectUrl>https://github.com/fsprojects/FSharp.Collections.Immutable/</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<ItemGroup>
<Compile Include="functional-utils.fs" />
<Compile Include="immutable-collection-util.fs" />
<Compile Include="flat-list.fs" />
<Compile Include="stack.fs" />
<Compile Include="immutable-list.fs" />
<Compile Include="queue.fs" />
<Compile Include="indexed-seq.fs" />
<Compile Include="maps.fs" />
<Compile Include="sets.fs" />
<Compile Include="seq.fs" />
</ItemGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
</Project>
Loading