Permalink
Browse files

fsharp map bug

  • Loading branch information...
1 parent de70939 commit d18dd3ac86725251a30b65802972eba0ad67e869 @rogeralsing committed Oct 19, 2016
Showing with 22 additions and 4 deletions.
  1. +6 −0 Wire.FSharpTestTypes/Library1.fs
  2. +3 −2 Wire.Test/project.lock.json
  3. +1 −0 Wire.Tests/Bugs.cs
  4. +12 −2 Wire.Tests/FSharpTests.cs
@@ -2,6 +2,8 @@
open Akka.Actor
+
+
type DU1 =
| A of int
| B of string * int
@@ -46,3 +48,7 @@ module TestQuotations =
| _ -> fib(n-1) + fib(n-2)
async { return fib x } @>
+ type RecordWithString = {Name:string}
+ type RecordWithMap = {SomeMap: Map<int,string>}
+ let createRecordWithMap = {SomeMap = Map.empty }
+
@@ -2480,10 +2480,11 @@
"lib/netstandard1.1/xunit.runner.utility.dotnet.dll": {}
}
},
- "Wire/0.6.2": {
+ "Wire/0.8.1": {
"type": "project",
"framework": ".NETStandard,Version=v1.6",
"dependencies": {
+ "Microsoft.CSharp": "4.0.1",
"NETStandard.Library": "1.6.0"
}
}
@@ -7365,7 +7366,7 @@
"xunit.runner.utility.nuspec"
]
},
- "Wire/0.6.2": {
+ "Wire/0.8.1": {
"type": "project",
"path": "../Wire/project.json"
}
View
@@ -7,6 +7,7 @@ namespace Wire.Tests
public class Bugs
{
+
public class ByteMessage
{
public DateTime UtcTime { get; }
@@ -1,4 +1,5 @@
-using Akka.Actor;
+using System.IO;
+using Akka.Actor;
using Microsoft.FSharp.Collections;
using Microsoft.FSharp.Core;
using Wire.FSharpTestTypes;
@@ -10,7 +11,16 @@ namespace Wire.Tests
{
public class FSharpTests : TestBase
{
-
+
+ [Fact]
+ public void CanSerializeFSharpMap()
+ {
+ var expected = FSharpTestTypes.TestQuotations.createRecordWithMap;
+ Serialize(expected);
+ Reset();
+ var actual = Deserialize<object>();
+ Assert.Equal(expected, actual);
+ }
[Fact]

0 comments on commit d18dd3a

Please sign in to comment.