You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Format GR style long member definition with return type.
* Format long members without return type the GR way.
* Format long constructors the GR way.
* Remove unnecessary ``new`` check
* Bump to alpha-013
Copy file name to clipboardExpand all lines: src/Fantomas.Tests/TypeDeclarationTests.fs
+171-3Lines changed: 171 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1217,7 +1217,8 @@ let ``member with one long parameter and no return type, 850`` () =
1217
1217
|> prepend newline
1218
1218
|> should equal """
1219
1219
type SomeType =
1220
-
static member SomeMember loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong1 =
1220
+
static member SomeMember loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong1
1221
+
=
1221
1222
printfn "a"
1222
1223
"b"
1223
1224
"""
@@ -1235,11 +1236,13 @@ let ``multiple members with one long parameter`` () =
1235
1236
|> prepend newline
1236
1237
|> should equal """
1237
1238
type SomeType =
1238
-
static member SomeMember loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong1 =
1239
+
static member SomeMember loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong1
1240
+
=
1239
1241
printfn "a"
1240
1242
"b"
1241
1243
1242
-
static member Serialize(loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong2: SomeType) =
1244
+
static member Serialize(loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong2: SomeType)
1245
+
=
1243
1246
Encode.string v.Meh
1244
1247
1245
1248
static member Deserialize(loooooooooooooooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnngggggggggggJsonVaaaaalueeeeeeeeeeeeeeee)
@@ -1472,3 +1475,168 @@ type TestType =
1472
1475
// Some more comments
1473
1476
private { Foo: int }
1474
1477
"""
1478
+
1479
+
[<Test>]
1480
+
let``alternative long member definition`` ()=
1481
+
formatSourceString false"""
1482
+
type C () =
1483
+
member __.LongMethodWithLotsOfParameters(aVeryLongType : AVeryLongTypeThatYouNeedToUse, aSecondVeryLongType : AVeryLongTypeThatYouNeedToUse,aThirdVeryLongType : AVeryLongTypeThatYouNeedToUse) =
0 commit comments