Skip to content

Commit 816efbd

Browse files
authored
Moretesting (#6602)
* Do more fsi and coreclr testing * Remove commented out text
1 parent f444e58 commit 816efbd

File tree

8 files changed

+202
-149
lines changed

8 files changed

+202
-149
lines changed

tests/fsharp/core/csext/test.fsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ xie.All(fun x -> x > 1)
3232
xie.Average()
3333
x.Average()
3434

35-
[<Struct>]
36-
type S(v:int) =
37-
interface System.Collections.Generic.IEnumerable<int> with
38-
member x.GetEnumerator() = (Seq.singleton v).GetEnumerator()
39-
interface System.Collections.IEnumerable with
40-
member x.GetEnumerator() = ((Seq.singleton v).GetEnumerator() :> System.Collections.IEnumerator)
41-
42-
let s : S = S(3)
43-
44-
s.Average()
35+
// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6601
36+
//[<Struct>]
37+
//type S(v:int) =
38+
// interface System.Collections.Generic.IEnumerable<int> with
39+
// member x.GetEnumerator() = (Seq.singleton v).GetEnumerator()
40+
// interface System.Collections.IEnumerable with
41+
// member x.GetEnumerator() = ((Seq.singleton v).GetEnumerator() :> System.Collections.IEnumerator)
42+
//
43+
//let s : S = S(3)
44+
//s.Average()
4545

4646

4747
[<Struct>]

tests/fsharp/core/libtest/test.fsx

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4918,15 +4918,15 @@ type ToStringClass(x) =
49184918
end
49194919
do check "Bug1049.customClass" (string (ToStringClass("fred"))) "fred"
49204920

4921-
[<Struct>]
4922-
type ToStringStruct =
4923-
struct
4924-
val x : int
4925-
new(x) = {x=x}
4926-
override this.ToString() = string this.x
4927-
end
4928-
do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"
4929-
4921+
// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6597
4922+
// [<Struct>]
4923+
// type ToStringStruct =
4924+
// struct
4925+
// val x : int
4926+
// new(x) = {x=x}
4927+
// override this.ToString() = string this.x
4928+
// end
4929+
// do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"
49304930
type ToStringEnum =
49314931
| A = 1
49324932
| B = 2
@@ -5121,7 +5121,6 @@ module Check1477 = begin
51215121
end
51225122
end
51235123

5124-
51255124
(*---------------------------------------------------------------------------
51265125
!* BUG 1561: (-star-star-) opens a comment but does not close it and other XML Doc issues.
51275126
*--------------------------------------------------------------------------- *)
@@ -5320,8 +5319,6 @@ end
53205319

53215320
module TestNoNullElementsInListChainFromInit = begin
53225321

5323-
5324-
53255322
let test n x =
53265323
printfn "testing %A" n;
53275324
let a = List.init n x in
@@ -5336,11 +5333,8 @@ module TestNoNullElementsInListChainFromInit = begin
53365333

53375334
end
53385335

5339-
53405336
module TestNoNullElementsInListChainFromUnzip = begin
53415337

5342-
5343-
53445338
let test x =
53455339
printfn "testing %A" x;
53465340
let a,b = List.unzip x in
@@ -5432,31 +5426,35 @@ module SetToString = begin
54325426
do check "cewjhnkrveo81p" ((Map.ofList [(4,40);(3,30);(2,20);(1,10)]) |> sprintf "%A") "map [(1, 10); (2, 20); (3, 30); (4, 40)]"
54335427
end
54345428

5435-
(*---------------------------------------------------------------------------
5436-
!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
5437-
*--------------------------------------------------------------------------- *)
5438-
module Bug5816 = begin
5439-
type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
5440-
abstract ViewModel : 'vm
5441-
end
5442-
and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
5443-
abstract View : 'v
5444-
end
5445-
end
5446-
(*---------------------------------------------------------------------------
5447-
!* Bug 5825: Constraints with nested types
5448-
*--------------------------------------------------------------------------- *)
5449-
module Bug5825 = begin
5450-
type I = interface
5451-
abstract member m : unit
5452-
end
5453-
type C() = class
5454-
interface I with
5455-
member this.m = ()
5456-
end
5457-
end
5458-
let f (c : #C) = ()
5459-
end
5429+
// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6599
5430+
5431+
//(*---------------------------------------------------------------------------
5432+
//!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
5433+
// *--------------------------------------------------------------------------- *)
5434+
//module Bug5816 = begin
5435+
// type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
5436+
// abstract ViewModel : 'vm
5437+
// end
5438+
// and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
5439+
// abstract View : 'v
5440+
// end
5441+
//end
5442+
5443+
// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6600
5444+
//(*---------------------------------------------------------------------------
5445+
//!* Bug 5825: Constraints with nested types
5446+
// *--------------------------------------------------------------------------- *)
5447+
//module Bug5825 = begin
5448+
// type I = interface
5449+
// abstract member m : unit
5450+
// end
5451+
// type C() = class
5452+
// interface I with
5453+
// member this.m = ()
5454+
// end
5455+
// end
5456+
// let f (c : #C) = ()
5457+
//end
54605458

54615459
module Bug5981 = begin
54625460
// guard against type variable tokens leaking into the IL stream
@@ -5501,7 +5499,6 @@ module Bug920236 =
55015499
for i in a do
55025500
result := i::(!result)
55035501
do test "hfduweyr" (!result = [box 1])
5504-
55055502

55065503
module TripleQuoteStrings =
55075504

@@ -5597,6 +5594,7 @@ module LittleTestFor823 =
55975594
let x, y = 1, 2
55985595
let v = Some ((x = y), (x = x))
55995596

5597+
56005598
(*---------------------------------------------------------------------------
56015599
!* wrap up
56025600
*--------------------------------------------------------------------------- *)

tests/fsharp/core/members/incremental-hw-mutrec/test.fs renamed to tests/fsharp/core/members/incremental-hw-mutrec/test.fsx

File renamed without changes.

tests/fsharp/core/printf/test.fsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3540,6 +3540,7 @@ let func2000()=
35403540
test "test2998" (lazy(sprintf "%-05x" 50000UL)) "c350 "
35413541
test "test2999" (lazy(sprintf "%-01x" 50000UL)) "c350"
35423542
test "test3000" (lazy(sprintf "%-0*x" 7 50000UL)) "c350 "
3543+
#if COMPILED
35433544
let func3000()=
35443545
test "test3001" (lazy(sprintf "%+x" 50000UL)) "+c350"
35453546
test "test3002" (lazy(sprintf "%+5x" 50000UL)) "+c350"
@@ -9283,16 +9284,18 @@ let func8000()=
92839284
test "test8735" (lazy(sprintf "09-00%d09-01%d09-02%d09-03%d09-04%d09-05%d09-06%d09-07%d09-08%a19-10%d19-11%d19-12%d19-13%d19-14%d19-15%d19-16%d19-17%d19-18%a29-20%d29-21%d29-22%d29-23%d29-24%d29-25%d29-26%d29-27%d29-28%a39-30%d39-31%d39-32%d39-33%d39-34%d39-35%d39-36%d39-37%d39-38%a49-40%d49-41%d49-42%d49-43%d49-44%d49-45%d49-46%d49-47%d49-48%a59-50%d59-51%d59-52%d59-53%d59-54%d59-55%d59-56%d59-57%d59-58%a69-60%d69-61%d69-62%d69-63%d69-64%d69-65%d69-66%d69-67%d69-68%a79-70%d79-71%d79-72%d79-73%d79-74%d79-75%d79-76%d79-77%d79-78%a89-80%d89-81%d89-82%d89-83%d89-84%d89-85%d89-86%d89-87%d89-88%a99-90%d99-91%d99-92%d99-93%d99-94%d99-95%d99-96%d99-97%d99-98%a_TAIL" 0 1 2 3 4 5 6 7 (fun _ v -> (string v) + "X") 1 10 11 12 13 14 15 16 17 (fun _ v -> (string v) + "X") 2 20 21 22 23 24 25 26 27 (fun _ v -> (string v) + "X") 3 30 31 32 33 34 35 36 37 (fun _ v -> (string v) + "X") 4 40 41 42 43 44 45 46 47 (fun _ v -> (string v) + "X") 5 50 51 52 53 54 55 56 57 (fun _ v -> (string v) + "X") 6 60 61 62 63 64 65 66 67 (fun _ v -> (string v) + "X") 7 70 71 72 73 74 75 76 77 (fun _ v -> (string v) + "X") 8 80 81 82 83 84 85 86 87 (fun _ v -> (string v) + "X") 9 90 91 92 93 94 95 96 97 (fun _ v -> (string v) + "X") System.IO.FileShare.Read )) "09-00009-01109-02209-03309-04409-05509-06609-07709-081X19-101019-111119-121219-131319-141419-151519-161619-171719-182X29-202029-212129-222229-232329-242429-252529-262629-272729-283X39-303039-313139-323239-333339-343439-353539-363639-373739-384X49-404049-414149-424249-434349-444449-454549-464649-474749-485X59-505059-515159-525259-535359-545459-555559-565659-575759-586X69-606069-616169-626269-636369-646469-656569-666669-676769-687X79-707079-717179-727279-737379-747479-757579-767679-777779-788X89-808089-818189-828289-838389-848489-858589-868689-878789-889X99-909099-919199-929299-939399-949499-959599-969699-979799-98ReadX_TAIL"
92849285
test "test8736" (lazy(sprintf "09-00%d09-01%d09-02%d09-03%d09-04%d09-05%d09-06%d09-07%d09-08%d09-09%a19-10%d19-11%d19-12%d19-13%d19-14%d19-15%d19-16%d19-17%d19-18%d19-19%a29-20%d29-21%d29-22%d29-23%d29-24%d29-25%d29-26%d29-27%d29-28%d29-29%a39-30%d39-31%d39-32%d39-33%d39-34%d39-35%d39-36%d39-37%d39-38%d39-39%a49-40%d49-41%d49-42%d49-43%d49-44%d49-45%d49-46%d49-47%d49-48%d49-49%a59-50%d59-51%d59-52%d59-53%d59-54%d59-55%d59-56%d59-57%d59-58%d59-59%a69-60%d69-61%d69-62%d69-63%d69-64%d69-65%d69-66%d69-67%d69-68%d69-69%a79-70%d79-71%d79-72%d79-73%d79-74%d79-75%d79-76%d79-77%d79-78%d79-79%a89-80%d89-81%d89-82%d89-83%d89-84%d89-85%d89-86%d89-87%d89-88%d89-89%a99-90%d99-91%d99-92%d99-93%d99-94%d99-95%d99-96%d99-97%d99-98%d99-99" 0 1 2 3 4 5 6 7 8 (fun _ v -> (string v) + "X") 1 10 11 12 13 14 15 16 17 18 (fun _ v -> (string v) + "X") 2 20 21 22 23 24 25 26 27 28 (fun _ v -> (string v) + "X") 3 30 31 32 33 34 35 36 37 38 (fun _ v -> (string v) + "X") 4 40 41 42 43 44 45 46 47 48 (fun _ v -> (string v) + "X") 5 50 51 52 53 54 55 56 57 58 (fun _ v -> (string v) + "X") 6 60 61 62 63 64 65 66 67 68 (fun _ v -> (string v) + "X") 7 70 71 72 73 74 75 76 77 78 (fun _ v -> (string v) + "X") 8 80 81 82 83 84 85 86 87 88 (fun _ v -> (string v) + "X") 9 90 91 92 93 94 95 96 97 98 )) "09-00009-01109-02209-03309-04409-05509-06609-07709-08809-091X19-101019-111119-121219-131319-141419-151519-161619-171719-181819-192X29-202029-212129-222229-232329-242429-252529-262629-272729-282829-293X39-303039-313139-323239-333339-343439-353539-363639-373739-383839-394X49-404049-414149-424249-434349-444449-454549-464649-474749-484849-495X59-505059-515159-525259-535359-545459-555559-565659-575759-585859-596X69-606069-616169-626269-636369-646469-656569-666669-676769-686869-697X79-707079-717179-727279-737379-747479-757579-767679-777779-787879-798X89-808089-818189-828289-838389-848489-858589-868689-878789-888889-899X99-909099-919199-929299-939399-949499-959599-969699-979799-989899-99"
92859286
test "test8737" (lazy(sprintf "09-00%d09-01%d09-02%d09-03%d09-04%d09-05%d09-06%d09-07%d09-08%d09-09%a19-10%d19-11%d19-12%d19-13%d19-14%d19-15%d19-16%d19-17%d19-18%d19-19%a29-20%d29-21%d29-22%d29-23%d29-24%d29-25%d29-26%d29-27%d29-28%d29-29%a39-30%d39-31%d39-32%d39-33%d39-34%d39-35%d39-36%d39-37%d39-38%d39-39%a49-40%d49-41%d49-42%d49-43%d49-44%d49-45%d49-46%d49-47%d49-48%d49-49%a59-50%d59-51%d59-52%d59-53%d59-54%d59-55%d59-56%d59-57%d59-58%d59-59%a69-60%d69-61%d69-62%d69-63%d69-64%d69-65%d69-66%d69-67%d69-68%d69-69%a79-70%d79-71%d79-72%d79-73%d79-74%d79-75%d79-76%d79-77%d79-78%d79-79%a89-80%d89-81%d89-82%d89-83%d89-84%d89-85%d89-86%d89-87%d89-88%d89-89%a99-90%d99-91%d99-92%d99-93%d99-94%d99-95%d99-96%d99-97%d99-98%d99-99%a_TAIL" 0 1 2 3 4 5 6 7 8 (fun _ v -> (string v) + "X") 1 10 11 12 13 14 15 16 17 18 (fun _ v -> (string v) + "X") 2 20 21 22 23 24 25 26 27 28 (fun _ v -> (string v) + "X") 3 30 31 32 33 34 35 36 37 38 (fun _ v -> (string v) + "X") 4 40 41 42 43 44 45 46 47 48 (fun _ v -> (string v) + "X") 5 50 51 52 53 54 55 56 57 58 (fun _ v -> (string v) + "X") 6 60 61 62 63 64 65 66 67 68 (fun _ v -> (string v) + "X") 7 70 71 72 73 74 75 76 77 78 (fun _ v -> (string v) + "X") 8 80 81 82 83 84 85 86 87 88 (fun _ v -> (string v) + "X") 9 90 91 92 93 94 95 96 97 98 (fun _ v -> (string v) + "X") System.IO.FileShare.Read )) "09-00009-01109-02209-03309-04409-05509-06609-07709-08809-091X19-101019-111119-121219-131319-141419-151519-161619-171719-181819-192X29-202029-212129-222229-232329-242429-252529-262629-272729-282829-293X39-303039-313139-323239-333339-343439-353539-363639-373739-383839-394X49-404049-414149-424249-434349-444449-454549-464649-474749-484849-495X59-505059-515159-525259-535359-545459-555559-565659-575759-585859-596X69-606069-616169-626269-636369-646469-656569-666669-676769-686869-697X79-707079-717179-727279-737379-747479-757579-767679-777779-787879-798X89-808089-818189-828289-838389-848489-858589-868689-878789-888889-899X99-909099-919199-929299-939399-949499-959599-969699-979799-989899-99ReadX_TAIL"
9287+
#endif
92869288
func0()
92879289
func1000()
92889290
func2000()
9291+
#if COMPILED
92899292
func3000()
92909293
func4000()
92919294
func5000()
92929295
func6000()
92939296
func7000()
92949297
func8000()
9295-
9298+
#endif
92969299

92979300
#if TESTS_AS_APP
92989301
let RUN() = !failures

tests/fsharp/core/recordResolution/build.bat

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)