@@ -83,10 +83,10 @@ let radioRefill() =
83
83
let input1 = r.[ 0 ]
84
84
let input2 = r.[ 2 ]
85
85
match input1 with
86
- | TagA(_, attr,_) -> Assert.False( Seq.exists ( fun ( k , _ ) -> k = " checked" ) attr)
86
+ | TagA(_, attr,_) -> Assert.False( Seq.exists ( fst >> (=) " checked" ) attr)
87
87
| _ -> failwith " err"
88
88
match input2 with
89
- | TagA(_, attr,_) -> Assert.True( Seq.exists ( fun ( k , _ ) -> k = " checked" ) attr)
89
+ | TagA(_, attr,_) -> Assert.True( Seq.exists ( fst >> (=) " checked" ) attr)
90
90
| _ -> failwith " err"
91
91
92
92
[<Fact>]
@@ -96,7 +96,7 @@ let checkboxRefill() =
96
96
let r = run formlet env |> fst3
97
97
printfn " %A " r
98
98
match r.[ 0 ] with
99
- | TagA(_, attr,_) -> Assert.True( Seq.exists ( fun ( k , _ ) -> k = " checked" ) attr)
99
+ | TagA(_, attr,_) -> Assert.True( Seq.exists ( fst >> (=) " checked" ) attr)
100
100
| _ -> failwith " err"
101
101
102
102
[<Fact>]
@@ -105,7 +105,7 @@ let inputRefill() =
105
105
let r = run input env |> fst3
106
106
printfn " %A " r
107
107
match r.[ 0 ] with
108
- | TagA(_, attr,_) -> Assert.True( Seq.exists ( fun ( k , v ) -> k = " value" && v = " pepe" ) attr)
108
+ | TagA(_, attr,_) -> Assert.True( Seq.exists ((=)( " value" , " pepe" ) ) attr)
109
109
| _ -> failwith " err"
110
110
111
111
[<Fact>]
@@ -264,7 +264,7 @@ let ``NameValueCollection to seq does not ignore duplicate keys``() =
264
264
e.Add( " 1" , " one" )
265
265
e.Add( " 1" , " uno" )
266
266
let values = NameValueCollection.toSeq e
267
- let values = values |> Seq.filter ( fun ( k , _ ) -> k = " 1" ) |> Seq.toList
267
+ let values = values |> Seq.filter ( fst >> (=) " 1" ) |> Seq.toList
268
268
Assert.Equal( 2 , values.Length)
269
269
270
270
[<Fact>]
@@ -560,9 +560,8 @@ let ``Color serialize``() =
560
560
561
561
[<Fact>]
562
562
let ``Color deserialize ok`` () =
563
- let color = colorSerializer.TryDeserialize " #FF3A3B"
564
- Assert.True( fst color)
565
- let color = snd color
563
+ let ok , color = colorSerializer.TryDeserialize " #FF3A3B"
564
+ Assert.True ok
566
565
Assert.Equal( 0xFF uy, color.R)
567
566
Assert.Equal( 0x3A uy, color.G)
568
567
Assert.Equal( 0x3B uy, color.B)
@@ -584,7 +583,6 @@ let ``function pickle``() =
584
583
match run f env with
585
584
| Success ff -> Assert.Equal( 5 , ff 2 3 )
586
585
| _ -> failwith " should not have failed"
587
- ()
588
586
589
587
[<Fact>]
590
588
let ``bin serializer string`` () =
0 commit comments