Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for rxquery.Zip #95

Merged
merged 1 commit into from
Jan 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion paket.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REDIRECTS: ON
FRAMEWORK: NET45, NET46
RESTRICTION: || (== net45) (== net46)
NUGET
remote: http://www.nuget.org/api/v2
FAKE (4.37.2)
Expand Down
6 changes: 3 additions & 3 deletions src/FSharp.Control.Reactive/FSharp.Control.Reactive.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.6')">
<ItemGroup>
<Reference Include="WindowsBase">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Reactive.Windows.Threading">
<HintPath>..\..\packages\System.Reactive.Windows.Threading\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="WindowsBase">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
Expand Down
2 changes: 1 addition & 1 deletion tests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="4.4.0.0" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="4.4.0.0" />
</dependentAssembly>
</assemblyBinding></runtime></configuration>
6 changes: 3 additions & 3 deletions tests/FSharp.Control.Reactive.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.6')">
<ItemGroup>
<Reference Include="WindowsBase">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Reactive.Windows.Threading">
<HintPath>..\packages\System.Reactive.Windows.Threading\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
<Reference Include="WindowsBase">
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
Expand Down
17 changes: 17 additions & 0 deletions tests/ObservableSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,23 @@ let ``When zip is defined with the applicative, it should match the result of Ob

Assert.That(!actual, Is.EqualTo (!expected))

[<Test>]
let ``zip used in rxquery matches output from Observable.zip`` () =
let a = Observable.ofSeq [1;2;3]
let b = Observable.ofSeq [1;2;3]

let expected = ResizeArray()
(Observable.zip a b).Subscribe(expected.Add) |> ignore

let actual = ResizeArray()
(rxquery {
for x in a do
zip y in b
yield x, y
}).Subscribe(actual.Add) |> ignore

Assert.That(List.ofSeq actual = List.ofSeq expected)

[<Test>]
let ``Test should show the stack overflow is fixed with Rx 2 beta``() =
let test() =
Expand Down