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

Moretesting #6602

Merged
merged 2 commits into from
Apr 22, 2019
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
20 changes: 10 additions & 10 deletions tests/fsharp/core/csext/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ xie.All(fun x -> x > 1)
xie.Average()
x.Average()

[<Struct>]
type S(v:int) =
interface System.Collections.Generic.IEnumerable<int> with
member x.GetEnumerator() = (Seq.singleton v).GetEnumerator()
interface System.Collections.IEnumerable with
member x.GetEnumerator() = ((Seq.singleton v).GetEnumerator() :> System.Collections.IEnumerator)

let s : S = S(3)

s.Average()
// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6601
//[<Struct>]
//type S(v:int) =
// interface System.Collections.Generic.IEnumerable<int> with
// member x.GetEnumerator() = (Seq.singleton v).GetEnumerator()
// interface System.Collections.IEnumerable with
// member x.GetEnumerator() = ((Seq.singleton v).GetEnumerator() :> System.Collections.IEnumerator)
//
//let s : S = S(3)
//s.Average()


[<Struct>]
Expand Down
80 changes: 39 additions & 41 deletions tests/fsharp/core/libtest/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -4918,15 +4918,15 @@ type ToStringClass(x) =
end
do check "Bug1049.customClass" (string (ToStringClass("fred"))) "fred"

[<Struct>]
type ToStringStruct =
struct
val x : int
new(x) = {x=x}
override this.ToString() = string this.x
end
do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"

// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6597
// [<Struct>]
// type ToStringStruct =
// struct
// val x : int
// new(x) = {x=x}
// override this.ToString() = string this.x
// end
// do check "Bug1049.customStruct" (string (ToStringStruct(123))) "123"
type ToStringEnum =
| A = 1
| B = 2
Expand Down Expand Up @@ -5121,7 +5121,6 @@ module Check1477 = begin
end
end


(*---------------------------------------------------------------------------
!* BUG 1561: (-star-star-) opens a comment but does not close it and other XML Doc issues.
*--------------------------------------------------------------------------- *)
Expand Down Expand Up @@ -5320,8 +5319,6 @@ end

module TestNoNullElementsInListChainFromInit = begin



let test n x =
printfn "testing %A" n;
let a = List.init n x in
Expand All @@ -5336,11 +5333,8 @@ module TestNoNullElementsInListChainFromInit = begin

end


module TestNoNullElementsInListChainFromUnzip = begin



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

(*---------------------------------------------------------------------------
!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
*--------------------------------------------------------------------------- *)
module Bug5816 = begin
type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
abstract ViewModel : 'vm
end
and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
abstract View : 'v
end
end
(*---------------------------------------------------------------------------
!* Bug 5825: Constraints with nested types
*--------------------------------------------------------------------------- *)
module Bug5825 = begin
type I = interface
abstract member m : unit
end
type C() = class
interface I with
member this.m = ()
end
end
let f (c : #C) = ()
end
// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6599

//(*---------------------------------------------------------------------------
//!* Bug 5816: Unable to define mutually recursive types with mutually recursive generic constraints within FSI
// *--------------------------------------------------------------------------- *)
//module Bug5816 = begin
// type IView<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
// abstract ViewModel : 'vm
// end
// and IViewModel<'v, 'vm when 'v :> IView<'v,'vm> and 'vm :> IViewModel<'v,'vm>> = interface
// abstract View : 'v
// end
//end

// BUGBUG: https://github.com/Microsoft/visualfsharp/issues/6600
//(*---------------------------------------------------------------------------
//!* Bug 5825: Constraints with nested types
// *--------------------------------------------------------------------------- *)
//module Bug5825 = begin
// type I = interface
// abstract member m : unit
// end
// type C() = class
// interface I with
// member this.m = ()
// end
// end
// let f (c : #C) = ()
//end

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


module TripleQuoteStrings =

Expand Down Expand Up @@ -5597,6 +5594,7 @@ module LittleTestFor823 =
let x, y = 1, 2
let v = Some ((x = y), (x = x))


(*---------------------------------------------------------------------------
!* wrap up
*--------------------------------------------------------------------------- *)
Expand Down
5 changes: 4 additions & 1 deletion tests/fsharp/core/printf/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3540,6 +3540,7 @@ let func2000()=
test "test2998" (lazy(sprintf "%-05x" 50000UL)) "c350 "
test "test2999" (lazy(sprintf "%-01x" 50000UL)) "c350"
test "test3000" (lazy(sprintf "%-0*x" 7 50000UL)) "c350 "
#if COMPILED
let func3000()=
test "test3001" (lazy(sprintf "%+x" 50000UL)) "+c350"
test "test3002" (lazy(sprintf "%+5x" 50000UL)) "+c350"
Expand Down Expand Up @@ -9283,16 +9284,18 @@ let func8000()=
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"
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"
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"
#endif
func0()
func1000()
func2000()
#if COMPILED
func3000()
func4000()
func5000()
func6000()
func7000()
func8000()

#endif

#if TESTS_AS_APP
let RUN() = !failures
Expand Down
6 changes: 0 additions & 6 deletions tests/fsharp/core/recordResolution/build.bat

This file was deleted.

Loading