[Pkg-cli-apps-commits] [fsharp] 34/71: enable most of tests/fsharp/core/... for single-file cross-platform testing
Christopher Halse Rogers
raof-guest at moszumanska.debian.org
Fri Jan 17 05:18:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
raof-guest pushed a commit to tag 3.1.0
in repository fsharp.
commit f02fdeb0070bdae98ce0ecdbbebdf4cc0499035e
Author: Don Syme <donsyme at fastmail.fm>
Date: Fri Nov 29 21:27:37 2013 +0000
enable most of tests/fsharp/core/... for single-file cross-platform testing
---
tests/fsharp/core/attributes/test.fsx | 4 +-
tests/fsharp/core/control/test.fsx | 71 ++++++++----
tests/fsharp/core/controlChamenos/test.fsx | 32 +++---
tests/fsharp/core/controlMailbox/test.fsx | 67 +++++------
tests/fsharp/core/controlStackOverflow/test.fsx | 33 +++---
tests/fsharp/core/controlWebExt/test.fsx | 36 +++---
tests/fsharp/core/genericmeasures/test.fsx | 24 ++--
tests/fsharp/core/int32/test.fsx | 3 +
tests/fsharp/core/libtest/test.fsx | 3 +
tests/fsharp/core/math/lalgebra/test.fsx | 4 +
tests/fsharp/core/math/numbers/test.fsx | 4 +
tests/fsharp/core/math/numbersVS2008/test.fsx | 21 +++-
tests/fsharp/core/members/basics/test-hw.fsx | 14 ++-
tests/fsharp/core/members/incremental/test-hw.fsx | 7 +-
tests/fsharp/core/members/incremental/test.fsx | 7 +-
tests/fsharp/core/queriesOverOData/test.fsx | 4 +
tests/fsharp/core/{all.fsx => run-all.fsx} | 129 ++++++++++++++--------
tests/fsharp/core/{all.sh => run-all.sh} | 2 +-
18 files changed, 298 insertions(+), 167 deletions(-)
diff --git a/tests/fsharp/core/attributes/test.fsx b/tests/fsharp/core/attributes/test.fsx
index a60b18b..d74304a 100644
--- a/tests/fsharp/core/attributes/test.fsx
+++ b/tests/fsharp/core/attributes/test.fsx
@@ -28,7 +28,9 @@ let test (s : string) b =
let check (s:string) e r =
if r = e then stdout.WriteLine (s+": YES")
- else (stdout.WriteLine ("\n***** "+s+": FAIL\n"); report_failure s)
+ else (stdout.Write ("\n***** "+s+": FAIL: ");
+ printfn "Expected '%A', Got '%A'" r e
+ report_failure s)
open System
open System.Diagnostics
diff --git a/tests/fsharp/core/control/test.fsx b/tests/fsharp/core/control/test.fsx
index dcaf638..85e4fb2 100644
--- a/tests/fsharp/core/control/test.fsx
+++ b/tests/fsharp/core/control/test.fsx
@@ -95,6 +95,7 @@ type Microsoft.FSharp.Control.Async with
return resArray }
module BasicTests =
+ let Run() =
check "cew23242g" (Async.RunSynchronously (async { do () })) ()
check "32o8f43k1" (Async.RunSynchronously (async { return () })) ()
check "32o8f43k2" (Async.RunSynchronously (async { return 1 })) 1
@@ -112,16 +113,16 @@ module BasicTests =
return x+1 }) with _ -> 2) 2
//check "32o8f43kt" (Async.RunSynchronously (Async.Catch (async { do failwith "error" }))) (Choice2Of2 (Failure "error"))
- check "32o8f43kt" (Async.RunSynchronously (Async.Catch (async { return 1 }))) (Choice1Of2 1)
+ check "32o8f43kta" (Async.RunSynchronously (Async.Catch (async { return 1 }))) (Choice1Of2 1)
- check "32o8f43kt" (Async.RunSynchronously (async { try
+ check "32o8f43ktb" (Async.RunSynchronously (async { try
do failwith "error"
return 3
with _ ->
return 2
})) 2
- check "32o8f43kt"
+ check "32o8f43ktc"
(Async.RunSynchronously
(async { try
do failwith "error"
@@ -131,7 +132,7 @@ module BasicTests =
}))
2
- check "32o8f43kt"
+ check "32o8f43ktd"
(Async.RunSynchronously
(async { try
try
@@ -144,7 +145,8 @@ module BasicTests =
}))
2
- check "32o8f43kt" (let x = ref 0
+ check "32o8f43kte"
+ (let x = ref 0
Async.RunSynchronously
(async { try
return ()
@@ -153,7 +155,8 @@ module BasicTests =
});
!x) 10
- check "32o8f43kt" (let x = ref 0
+ check "32o8f43ktf"
+ (let x = ref 0
(try
Async.RunSynchronously
(async { try
@@ -165,7 +168,8 @@ module BasicTests =
!x) 10
- check "32o8f43kt" (let x = ref 0
+ check "32o8f43ktg"
+ (let x = ref 0
(try
Async.RunSynchronously
(async { try
@@ -179,7 +183,8 @@ module BasicTests =
with Failure _ -> ());
!x) 2
- check "32o8f43kt" (let x = ref 0
+ check "32o8f43kth"
+ (let x = ref 0
(try
Async.RunSynchronously
(async { try
@@ -330,7 +335,8 @@ module StartChildTrampoliningCheck =
module StartChildOutsideOfAsync =
- open System.Threading
+ open System.Threading
+ let Run() =
check "dshfukeryhu8we"
(let b = async {return 27} |> Async.StartChild
@@ -359,19 +365,21 @@ module StartChildOutsideOfAsync =
true
-check "32o8f43kaI: Spawn"
- (let result = ref 0
- Async.Start(async { do printfn "hello 1"
- do! Async.Sleep(30)
- do result := 1 });
- while !result = 0 do
- printf "."
+module SpawnTests =
+ let Run() =
+ check "32o8f43kaI: Spawn"
+ (let result = ref 0
+ Async.Start(async { do printfn "hello 1"
+ do! Async.Sleep(30)
+ do result := 1 });
+ while !result = 0 do
+ printf "."
#if NetCore
- Task.Delay(10).Wait()
+ Task.Delay(10).Wait()
#else
- System.Threading.Thread.Sleep(10)
+ System.Threading.Thread.Sleep(10)
#endif
- !result) 1
+ !result) 1
module FromBeginEndTests =
@@ -524,7 +532,7 @@ module AwaitEventTests =
expectedResult
- AwaitEventTest()
+ //AwaitEventTest()
module AsBeginEndTests =
@@ -720,7 +728,7 @@ module AsBeginEndTests =
(try req.EndAsync(iar) with :? System.OperationCanceledException as e -> 100 ))
100
- AsBeginEndTest()
+ //AsBeginEndTest()
(*
@@ -771,6 +779,7 @@ check "32o8f43ka2: Cancel a For loop"
*)
module OnCancelTests =
+ let Run() =
check "32o8f43ka1: No cancellation"
(let count = ref 0
let res = ref 0
@@ -1004,6 +1013,7 @@ module SyncContextReturnTests =
#endif
module GenerateTests =
+ let Run() =
for n = 0 to 20 do
check (sprintf "32o8f43ka2: Async.Generate, n = %d" n)
(Async.RunSynchronously (Async.Generate(n, (fun i -> async { return i })))) [| 0..n-1 |]
@@ -1028,6 +1038,7 @@ module GenerateTests =
[| 0xdeadbeef |]
module ParallelTests =
+ let Run() =
for n = 1 to 20 do
check
(sprintf "32o8f43ka6: Async.Parallel w/- last failure, n = %d" n)
@@ -1143,6 +1154,7 @@ module ParallelTests =
#if NetCore
#else
module AsyncWaitOneTest1 =
+ let Run() =
check
"c32398u1: AsyncWaitOne"
@@ -1268,6 +1280,7 @@ Async.RunSynchronously (async { let! n = s.AsyncRead(buffer,0,9) in return n })
#if NetCore
#else
module AsyncGenerateTests =
+ let Run() =
for length in 1 .. 10 do
for chunks in 1 .. 10 do
check (sprintf "c3239438u: Run/Generate, length=%d, chunks=%d" length chunks)
@@ -2047,9 +2060,23 @@ module Bug391710 =
check "Bug391710" true false
printfn "%s" (e.ToString())
+// Some tests should not be run in the static constructor
+let RunAll() =
+ BasicTests.Run()
+ StartChildOutsideOfAsync.Run()
+ SpawnTests.Run()
+ AsBeginEndTests.AsBeginEndTest()
+ AwaitEventTests.AwaitEventTest()
+ OnCancelTests.Run()
+ GenerateTests.Run()
+ ParallelTests.Run()
+ AsyncWaitOneTest1.Run()
+ AsyncGenerateTests.Run()
+
#if ALL_IN_ONE
-let RUN() = failures
+let RUN() = RunAll(); failures
#else
+RunAll()
let aa =
if not failures.IsEmpty then
stdout.WriteLine "Test Failed"
diff --git a/tests/fsharp/core/controlChamenos/test.fsx b/tests/fsharp/core/controlChamenos/test.fsx
index 66735dd..4f942d5 100644
--- a/tests/fsharp/core/controlChamenos/test.fsx
+++ b/tests/fsharp/core/controlChamenos/test.fsx
@@ -115,7 +115,7 @@ open System
open System.Diagnostics
-let () =
+let RunAll() =
let meetings = 100000
let colors = [Blue; Red; Yellow; Blue]
@@ -128,23 +128,17 @@ let () =
check "Chamenos" (Seq.sum meets) (meetings*2)
-#if Portable
-let aa =
- if not failures.IsEmpty then exit 1
- else
- stdout.WriteLine "Test Passed"
- exit 0
+#if ALL_IN_ONE
+let RUN() = RunAll(); failures
#else
-let _ =
- if not failures.IsEmpty then (stdout.WriteLine("Test Failed, failures = {0}", failures); exit 1)
- else (stdout.WriteLine "Test Passed";
- log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
- System.IO.File.WriteAllText("test.ok","ok");
-// debug: why is the fsi test failing? is it because test.ok does not exist?
- if System.IO.File.Exists("test.ok") then
- stdout.WriteLine ("test.ok found at {0}", System.IO.FileInfo("test.ok").FullName)
- else
- stdout.WriteLine ("test.ok not found")
- exit 0)
+RunAll()
+let aa =
+ if not failures.IsEmpty then
+ stdout.WriteLine "Test Failed"
+ exit 1
+ else
+ stdout.WriteLine "Test Passed"
+ log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
+ System.IO.File.WriteAllText("test.ok","ok")
+ exit 0
#endif
-
diff --git a/tests/fsharp/core/controlMailbox/test.fsx b/tests/fsharp/core/controlMailbox/test.fsx
index 293d702..0e22a2c 100644
--- a/tests/fsharp/core/controlMailbox/test.fsx
+++ b/tests/fsharp/core/controlMailbox/test.fsx
@@ -322,7 +322,6 @@ module MailboxProcessorBasicTests =
mb.Post(true)
r)
None
- test()
module MailboxProcessorErrorEventTests =
exception Err of int
@@ -374,7 +373,6 @@ module MailboxProcessorErrorEventTests =
#endif
!res)
100
- test()
type msg = Increment of int | Fetch of AsyncReplyChannel<int> | Reset
let mailboxes() = new MailboxProcessor<msg>(fun inbox ->
@@ -578,22 +576,6 @@ type Path(str) =
current <- n
-test5()
-test6()
-timeout_para()
-timeout_par()
-timeout_para_def()
-timeout_par_def()
-timeout_tpara()
-timeout_tpar()
-timeout_tpara_def()
-timeout_tpar_def()
-// ToDo: 7/31/2008: Disabled because of probable timing issue. QA needs to re-enable post-CTP.
-// Tracked by bug FSharp 1.0:2891
-//test15()
-// ToDo: 7/31/2008: Disabled because of probable timing issue. QA needs to re-enable post-CTP.
-// Tracked by bug FSharp 1.0:2891
-//test15b()
module LotsOfMessages =
let test () =
@@ -625,20 +607,39 @@ module LotsOfMessages =
System.Threading.Thread.Sleep(10)
#endif
check "celrv09ervknf3ew" logger.CurrentQueueLength 0
- test()
-#if Portable
-let aa = if not failures.IsEmpty then exit 1 else stdout.WriteLine "Test Passed"; exit 0
+let RunAll() =
+ MailboxProcessorBasicTests.test()
+ MailboxProcessorErrorEventTests.test()
+ test5()
+ test6()
+ timeout_para()
+ timeout_par()
+ timeout_para_def()
+ timeout_par_def()
+ timeout_tpara()
+ timeout_tpar()
+ timeout_tpara_def()
+ timeout_tpar_def()
+ // ToDo: 7/31/2008: Disabled because of probable timing issue. QA needs to re-enable post-CTP.
+ // Tracked by bug FSharp 1.0:2891
+ //test15()
+ // ToDo: 7/31/2008: Disabled because of probable timing issue. QA needs to re-enable post-CTP.
+ // Tracked by bug FSharp 1.0:2891
+ //test15b()
+ LotsOfMessages.test()
+
+#if ALL_IN_ONE
+let RUN() = RunAll(); failures
#else
-let _ =
- if not failures.IsEmpty then (stdout.WriteLine("Test Failed, failures = {0}", failures); exit 1)
- else (stdout.WriteLine "Test Passed";
- log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
- System.IO.File.WriteAllText("test.ok","ok");
-// debug: why is the fsi test failing? is it because test.ok does not exist?
- if System.IO.File.Exists("test.ok") then
- stdout.WriteLine ("test.ok found at {0}", System.IO.FileInfo("test.ok").FullName)
- else
- stdout.WriteLine ("test.ok not found")
- exit 0)
-#endif
\ No newline at end of file
+RunAll()
+let aa =
+ if not failures.IsEmpty then
+ stdout.WriteLine "Test Failed"
+ exit 1
+ else
+ stdout.WriteLine "Test Passed"
+ log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
+ System.IO.File.WriteAllText("test.ok","ok")
+ exit 0
+#endif
diff --git a/tests/fsharp/core/controlStackOverflow/test.fsx b/tests/fsharp/core/controlStackOverflow/test.fsx
index 63f3278..37d36e0 100644
--- a/tests/fsharp/core/controlStackOverflow/test.fsx
+++ b/tests/fsharp/core/controlStackOverflow/test.fsx
@@ -277,7 +277,6 @@ module StackDiveTests =
(so8 10000 |> Async.RunSynchronously)
8
- test()
module ReturnStackoverflow =
let test () =
@@ -415,22 +414,22 @@ module ReturnStackoverflow =
| :? System.OperationCanceledException -> "success")
"success"
- test()
(*******************************************************************************)
-#if Portable
-let aa =
- if not failures.IsEmpty then exit 1
- else stdout.WriteLine "Test Passed"; exit 0
+let RunAll() =
+ StackDiveTests.test()
+ ReturnStackoverflow.test()
+
+#if ALL_IN_ONE
+let RUN() = RunAll(); failures
#else
-let _ =
- if not failures.IsEmpty then (stdout.WriteLine("Test Failed, failures = {0}", failures); exit 1)
- else (stdout.WriteLine "Test Passed";
- log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
- System.IO.File.WriteAllText("test.ok","ok");
-// debug: why is the fsi test failing? is it because test.ok does not exist?
- if System.IO.File.Exists("test.ok") then
- stdout.WriteLine ("test.ok found at {0}", System.IO.FileInfo("test.ok").FullName)
- else
- stdout.WriteLine ("test.ok not found")
- exit 0)
+RunAll()
+let aa =
+ if not failures.IsEmpty then
+ stdout.WriteLine "Test Failed"
+ exit 1
+ else
+ stdout.WriteLine "Test Passed"
+ log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
+ System.IO.File.WriteAllText("test.ok","ok")
+ exit 0
#endif
diff --git a/tests/fsharp/core/controlWebExt/test.fsx b/tests/fsharp/core/controlWebExt/test.fsx
index d23f910..c575657 100644
--- a/tests/fsharp/core/controlWebExt/test.fsx
+++ b/tests/fsharp/core/controlWebExt/test.fsx
@@ -1,4 +1,7 @@
// #Conformance #ComputationExpressions #Async
+#if ALL_IN_ONE
+module Core_controlWebExt
+#endif
#light
let failuresFile =
@@ -101,7 +104,6 @@ module WebResponseTests =
check "WebRequest cancellation test final result" !active 0
- repeatedFetchAndCancelTest()
module WebClientTests =
@@ -145,18 +147,22 @@ module WebClientTests =
printfn "final: active = %d" !active
check "WebClient cancellation test final result" !active 0
- repeatedFetchAndCancelTest()
-
-
-let _ =
- if not failures.IsEmpty then (stdout.WriteLine("Test Failed, failures = {0}", failures); exit 1)
- else (stdout.WriteLine "Test Passed";
- log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
- System.IO.File.WriteAllText("test.ok","ok");
-// debug: why is the fsi test failing? is it because test.ok does not exist?
- if System.IO.File.Exists("test.ok") then
- stdout.WriteLine ("test.ok found at {0}", System.IO.FileInfo("test.ok").FullName)
- else
- stdout.WriteLine ("test.ok not found")
- exit 0)
+let RunAll() =
+ WebClientTests.repeatedFetchAndCancelTest()
+ WebResponseTests.repeatedFetchAndCancelTest()
+
+#if ALL_IN_ONE
+let RUN() = RunAll(); failures
+#else
+RunAll()
+let aa =
+ if not failures.IsEmpty then
+ stdout.WriteLine "Test Failed"
+ exit 1
+ else
+ stdout.WriteLine "Test Passed"
+ log "ALL OK, HAPPY HOLIDAYS, MERRY CHRISTMAS!"
+ System.IO.File.WriteAllText("test.ok","ok")
+ exit 0
+#endif
diff --git a/tests/fsharp/core/genericmeasures/test.fsx b/tests/fsharp/core/genericmeasures/test.fsx
index 16c4bde..712a1af 100644
--- a/tests/fsharp/core/genericmeasures/test.fsx
+++ b/tests/fsharp/core/genericmeasures/test.fsx
@@ -51,11 +51,19 @@ module Core_genericMeasures =
let x = 0<_>
T.Foo1(x)
- foo()
- T.Bar()
- T.Baz()
-
- let aa =
- stdout.WriteLine "Test Passed"
- System.IO.File.WriteAllText("test.ok", "ok")
- exit 0
\ No newline at end of file
+ let RunAll() =
+ foo()
+ T.Bar()
+ T.Baz()
+
+
+#if ALL_IN_ONE
+ let RUN() = RunAll(); []
+#else
+ RunAll();
+ stdout.WriteLine "Test Passed"
+ System.IO.File.WriteAllText("test.ok","ok")
+ exit 0
+#endif
+
+
diff --git a/tests/fsharp/core/int32/test.fsx b/tests/fsharp/core/int32/test.fsx
index f3197bb..73bf788 100644
--- a/tests/fsharp/core/int32/test.fsx
+++ b/tests/fsharp/core/int32/test.fsx
@@ -38,7 +38,10 @@ do SetCulture()
do stdout.WriteLine "checking unchecked conversions";
+#if MONO // https://github.com/fsharp/fsharp/issues/186
+#else
do test "testb3" (try nativeint 0.0 = 0n with _ -> false)
+#endif
do test "testnr6" (try int64 0.0 = 0L with _ -> false)
do test "testn46" (try int32 0.0 = 0 with _ -> false)
do test "testqb3" (try int16 0.0 = 0s with _ -> false)
diff --git a/tests/fsharp/core/libtest/test.fsx b/tests/fsharp/core/libtest/test.fsx
index 5e26c0e..f98062d 100644
--- a/tests/fsharp/core/libtest/test.fsx
+++ b/tests/fsharp/core/libtest/test.fsx
@@ -695,6 +695,8 @@ let _ = printString "hash is interesting (bytearray 1): "; if hash "abc"B = hash
let _ = printString "hash is interesting (string array 1): "; if hash [| "abc"; "e" |] = hash [| "abc"; "d" |] then reportFailure "basic test Q185" else stdout.WriteLine "YES"
let _ = printString "hash is interesting (intarray 1): "; if hash [| 3; 4 |] = hash [| 3; 5 |] then reportFailure "basic test Q186" else stdout.WriteLine "YES"
+#if MONO // See https://github.com/fsharp/fsharp/issues/188
+#else
(* F# compiler does many special tricks to get fast type-specific structural hashing. *)
(* A compiler could only work out that the following hash is type-specific if it inlines *)
(* the whole function, which is very unlikely. *)
@@ -740,6 +742,7 @@ let _ = printString "type specific hash matches generic hash (string array,12):
let _ = printString "type specific hash matches generic hash (byte array,12): "; if hash "abc"B = genericHash "abc"B then stdout.WriteLine "YES" else reportFailure "basic test Q204"
let _ = printString "type specific hash matches generic hash (byte array,12): "; if hash ""B = genericHash ""B then stdout.WriteLine "YES" else reportFailure "basic test Q205"
let _ = printString "type specific hash matches generic hash (byte array,12): "; if hash [| |] = genericHash [| |] then stdout.WriteLine "YES" else reportFailure "basic test Q206"
+#endif
(*---------------------------------------------------------------------------
diff --git a/tests/fsharp/core/math/lalgebra/test.fsx b/tests/fsharp/core/math/lalgebra/test.fsx
index b98a6a1..4e53546 100644
--- a/tests/fsharp/core/math/lalgebra/test.fsx
+++ b/tests/fsharp/core/math/lalgebra/test.fsx
@@ -1,4 +1,8 @@
// #Conformance #Regression
+#if ALL_IN_ONE
+module Core_math_lalgebra
+#endif
+
#light
// CONTENTS-INDEX-REGEXP = FROM>^\//! <TO
diff --git a/tests/fsharp/core/math/numbers/test.fsx b/tests/fsharp/core/math/numbers/test.fsx
index 4e1978d..69bd797 100644
--- a/tests/fsharp/core/math/numbers/test.fsx
+++ b/tests/fsharp/core/math/numbers/test.fsx
@@ -1,4 +1,8 @@
// #Regression #Conformance #Regression
+#if ALL_IN_ONE
+module Core_math_numbers
+#endif
+
#light
#nowarn "49";;
#nowarn "44";;
diff --git a/tests/fsharp/core/math/numbersVS2008/test.fsx b/tests/fsharp/core/math/numbersVS2008/test.fsx
index 9148a13..989ff3c 100644
--- a/tests/fsharp/core/math/numbersVS2008/test.fsx
+++ b/tests/fsharp/core/math/numbersVS2008/test.fsx
@@ -1,4 +1,8 @@
// #Regression #Conformance #Regression
+#if ALL_IN_ONE
+module Core_math_numbersVS2008
+#endif
+
#light
#nowarn "49";;
#nowarn "44";;
@@ -24,15 +28,16 @@ let test (s : string) b =
if b then stderr.WriteLine " OK"
else report_failure (s)
-let check s b1 b2 = test s (b1 = b2)
+let checkEq (s:string) b1 b2 =
+ stderr.Write(s)
+ if b1 = b2 then stderr.WriteLine " OK"
+ else report_failure (s + sprintf ", expected %A, got %A" b2 b1)
(* START *)
// Misc construction.
open Microsoft.FSharp.Math
open System.Numerics
-let fail() = report_failure("Failed")
-let checkEq desc a b = if a<>b then printf "Failed %s. %A <> %A\n" desc a b; fail()
// Regression 3481: Tables
@@ -241,7 +246,11 @@ let negative64s =
(-1152921504606846977L , -1152921504606846976L , -1152921504606846975L);
(-2305843009213693953L , -2305843009213693952L , -2305843009213693951L);
(-4611686018427387905L , -4611686018427387904L , -4611686018427387903L);
+#if MONO // https://github.com/fsharp/fsharp/issues/190
+ (9223372036854775807L , -9223372036854775808L , -9223372036854775807L); (* MinValue is -2^63 *)
+#else
(999L , -9223372036854775808L , -9223372036854775807L); (* MinValue is -2^63 *)
+#endif
(999L , 999L , 999L)]
// Regression 3481: ToInt32
@@ -254,8 +263,10 @@ let triple64 k n = triple k n (fun x -> try int64 x with :? System.OverflowExcep
printf "Checking BigInt ToInt32 and ToInt64\n"
checkEq "BigInt.ToInt32 positives" positive32s (List.map (triple32 1I) [0 .. 32])
checkEq "BigInt.ToInt32 negatives" negative32s (List.map (triple32 -1I) [0 .. 32])
-checkEq "BigInt.ToInt64 positives" positive64s (List.map (triple64 1I) [0 .. 64])
-checkEq "BigInt.ToInt64 positives" negative64s (List.map (triple64 -1I) [0 .. 64])
+for (a,b) in List.zip positive64s (List.map (triple64 1I) [0 .. 64]) do
+ checkEq "BigInt.ToInt64 positives" a b
+for (a,b) in List.zip negative64s (List.map (triple64 -1I) [0 .. 64]) do
+ checkEq "BigInt.ToInt64 negatives" a b
;;
diff --git a/tests/fsharp/core/members/basics/test-hw.fsx b/tests/fsharp/core/members/basics/test-hw.fsx
index 5c45d9b..2c93300 100644
--- a/tests/fsharp/core/members/basics/test-hw.fsx
+++ b/tests/fsharp/core/members/basics/test-hw.fsx
@@ -2350,11 +2350,16 @@ module MemoizeSample =
lookasideTable.Clear() }
+ do printfn "MemoizeSample - #0"
let rec fibFast = memoize (fun n -> if n <= 2 then 1 else fibFast.[n-1] + fibFast.[n-2])
+ do printfn "Memoize #1"
fibFast.[3]
+ do printfn "Memoize #2"
fibFast.[30]
+ do printfn "Memoize #3"
fibFast.Clear()
+ do printfn "Memoize #4"
(*
module NameLookupServiceExample =
@@ -2404,6 +2409,7 @@ module NameLookupServiceExample =
module ConstraintsInMembers = begin
+ do printfn "ConstraintsInMembers"
type IDuplex =
interface
end
@@ -2431,6 +2437,7 @@ end
module InterfaceCastingTests = begin
+ do printfn "InterfaceCastingTests"
type IBar =
interface
end
@@ -3159,7 +3166,8 @@ module UnitArgs =
// Finish up
-
+#if MONO // bug repro1
+#else
module SingleArgumentFunctions =
type C() =
@@ -3181,6 +3189,7 @@ module SingleArgumentFunctions =
let c = C()
printfn "c.Result = %d" c.Result
test "vrewiorvw09j" (c.Result = 18)
+#endif
module MultiArgumentFunctions =
type C() =
@@ -3232,6 +3241,8 @@ module GenericFunctions =
printfn "c.Result = %d" c.Result
test "vrewiorvw09d" (c.Result = 14)
+#if MONO // bug repro1 (uncomfirmed)
+#else
module GenericFunctionInGenericClass =
type C<'a>() =
let f1 x1 = x1
@@ -3256,6 +3267,7 @@ module GenericFunctionInGenericClass =
printfn "c2.Result = %d" c2.Result
test "vrewiorvw09s" (c.Result = 42)
test "vrewiorvw09a" (c2.Result = 50)
+#endif
module TailCallLoop =
type C<'a>() =
diff --git a/tests/fsharp/core/members/incremental/test-hw.fsx b/tests/fsharp/core/members/incremental/test-hw.fsx
index 6075fa2..9996d5e 100644
--- a/tests/fsharp/core/members/incremental/test-hw.fsx
+++ b/tests/fsharp/core/members/incremental/test-hw.fsx
@@ -226,6 +226,8 @@ module WireVariations =
//! Area variations
+#if Portable
+#else
module AreaVariations =
(* Accepted *)
open System.Drawing
@@ -373,7 +375,7 @@ module AreaVariations =
val f : 'a -> 'a
new (x:int) = { f = fun x -> x}
-
+#endif
//! Person
@@ -402,6 +404,8 @@ module ScalaPersonExample =
//! Forms
+#if Portable
+#else
module Forms1 =
open System.Drawing
open System.Windows.Forms
@@ -448,6 +452,7 @@ module Forms2 =
do dp.GC.DrawLine(Pens.White,10,20,30,40)
do dp.Redraw()
+#endif
module Regression1 =
(* Regression test: local vals of unit type are not given field storage (even if mutable) *)
diff --git a/tests/fsharp/core/members/incremental/test.fsx b/tests/fsharp/core/members/incremental/test.fsx
index 013e4c9..124d163 100644
--- a/tests/fsharp/core/members/incremental/test.fsx
+++ b/tests/fsharp/core/members/incremental/test.fsx
@@ -253,6 +253,8 @@ end
//! Area variations
+#if Portable
+#else
module AreaVariations = begin
(* Accepted *)
open System.Drawing
@@ -402,7 +404,7 @@ module AreaVariations = begin
end
end
-
+#endif
//! Person
(* Scala person example *)
@@ -429,6 +431,8 @@ end
//! Forms
+#if Portable
+#else
module Forms1 = begin
open System.Drawing
open System.Windows.Forms
@@ -475,6 +479,7 @@ module Forms2 = begin
do dp.GC.DrawLine(Pens.White,10,20,30,40)
do dp.Redraw()
end
+#endif
module Regression1 = begin
(* Regression test: local vals of unit type are not given field storage (even if mutable) *)
diff --git a/tests/fsharp/core/queriesOverOData/test.fsx b/tests/fsharp/core/queriesOverOData/test.fsx
index a3fbbe6..4deec2c 100644
--- a/tests/fsharp/core/queriesOverOData/test.fsx
+++ b/tests/fsharp/core/queriesOverOData/test.fsx
@@ -1,4 +1,8 @@
// #Quotations
+#if ALL_IN_ONE
+module Core_queriesOverOData
+#endif
+
#nowarn "57"
#r "System.Data.Services.Client.dll"
#r "FSharp.Data.TypeProviders.dll"
diff --git a/tests/fsharp/core/all.fsx b/tests/fsharp/core/run-all.fsx
similarity index 68%
rename from tests/fsharp/core/all.fsx
rename to tests/fsharp/core/run-all.fsx
index 6407038..531c759 100644
--- a/tests/fsharp/core/all.fsx
+++ b/tests/fsharp/core/run-all.fsx
@@ -19,21 +19,14 @@ let check (dir:string) f =
System.Console.WriteLine ""
-(*
#load "queriesCustomQueryOps/test.fsx"
#load "queriesLeafExpressionConvert/test.fsx"
#load "queriesNullableOperators/test.fsx"
-#load "queriesOverIEnumerable/test.fsx"
-#load "queriesOverIQueryable/test.fsx"
check "queriesCustomQueryOps/test.fsx" Core_queriesCustomQueryOps.RUN
check "queriesLeafExpressionConvert/test.fsx" Core_queriesLeafExpressionConvert.RUN
check "queriesNullableOperators/test.fsx" Core_queriesNullableOperators.RUN
-check "queriesOverIEnumerable/test.fsx" Core_queriesOverIEnumerable.RUN
-check "queriesOverIQueryable/test.fsx" Core_queriesOverIQueryable.RUN
-*)
-(*
#load "subtype/test.fsx"
#load "syntax/test.fsx"
#load "tlr/test.fsx"
@@ -43,51 +36,55 @@ check "subtype" Core_subtype.RUN
check "syntax" (fun () -> if Core_syntax.RUN() then ["FAILED"] else [])
check "tlr" Core_tlr.RUN
check "unicode" Core_unicode.RUN
-*)
-(*
#load "quotes/test.fsx"
#load "quotesDebugInfo/test.fsx"
#load "seq/test.fsx"
#load "nested/test.fsx"
#load "patterns/test.fsx"
-#load "printf/test.fsx"
check "quotes/test.fsx" Core_quotes.RUN
check "quotesDebugInfo/test.fsx" (fun () -> match Test.RUN() with 0 -> [] | n -> [sprintf "%d failures" n])
check "seq/test.fsx" Core_seq.RUN
check "nested/test.fsx" Core_nested.RUN
check "patterns/test.fsx" Core_patterns.RUN
-check "printf/test.fsx" Core_printf.RUN
-*)
+
+// PASSED, but slow
+// #load "printf/test.fsx"
+// check "printf/test.fsx" Core_printf.RUN
+
#load "lift/test.fsx"
-#load "members/basics/test-hw.fsx"
+check "lift" Core_lift.RUN
+
#load "members/ctree/test.fsx"
#load "members/factors/test.fsx"
+#load "members/ops/test.fsx"
#load "members/incremental/test-hw.fsx"
#load "members/incremental/test.fsx"
-#load "members/ops/test.fsx"
-check "lift" Core_lift.RUN
-check "members/basics/test.fsx" Core_members_basics.RUN
check "members/ctree/test.fsx" Core_members_ctree.RUN
check "members/factors/test.fsx" Core_members_factors.RUN
-check "members/incremental/test.fsx" Core_members_incremental.RUN
-check "members/incremental/test-hw.fsx" Core_members_incremental_testhw.RUN
check "members/ops/test.fsx" Core_members_ops.RUN
+check "members/incremental/test-hw.fsx" Core_members_incremental_testhw.RUN
+check "members/incremental/test.fsx" Core_members_incremental.RUN
+
-(*
#load "longnames/test.fsx"
#load "map/test.fsx"
#load "lazy/test.fsx"
#load "letrec/test.fsx"
-#load "libtest/test.fsx"
-#load "int32/test.fsx"
+
+
+check "longnames" Core_longnames.RUN
+check "lazy" Core_lazy.RUN
+check "map" Core_map.RUN
+check "letrec" Core_letrec.RUN
+
#load "innerpoly/test.fsx"
+check "innerpoly" Core_innerpoly.RUN
#load "comprehensions/test.fsx"
-#load "attributes/test.fsx"
#load "array/test.fsx"
#load "apporder/test.fsx"
#load "access/test.fsx"
@@ -96,16 +93,73 @@ check "members/ops/test.fsx" Core_members_ops.RUN
check "access" Core_access.RUN
check "apporder" Core_apporder.RUN
check "array" Core_array.RUN
-check "attributes" Core_attributes.RUN
check "comprehensions" Core_comprehensions.RUN
-check "innerpoly" Core_innerpoly.RUN
-check "int32" Core_int32.RUN
-check "lazy" Core_lazy.RUN
-check "libtest" Core_libtest.RUN
-check "letrec" Core_letrec.RUN
-check "longnames" Core_longnames.RUN
-check "map" Core_map.RUN
-*)
+
+
+#load "math/numbers/test.fsx"
+#load "math/numbersVS2008/test.fsx"
+#load "measures/test.fsx"
+#load "genericmeasures/test.fsx"
+
+check "math/numbers/test.fsx" Core_math_numbers.RUN
+check "math/numbersVS2008/test.fsx" Core_math_numbersVS2008.RUN
+check "math/measures/test.fsx" Core_measures.RUN
+check "math/measures/test.fsx" Core_genericMeasures.RUN
+
+
+#load "control/test.fsx"
+check "control/test.fsx" Core_control.RUN
+
+#load "controlChamenos/test.fsx"
+check "controlChamenos/test.fsx" Core_controlChamenos.RUN
+
+#load "controlMailbox/test.fsx"
+check "controlMailbox/test.fsx" Core_controlMailBox.RUN
+
+// PASSED, but slow
+// #load "controlStackOverflow/test.fsx"
+// check "controlStackOverflow/test.fsx" Core_controlStackOverflow.RUN
+
+
+// FAILED: https://github.com/fsharp/fsharp/issues/183
+// #load "queriesOverIEnumerable/test.fsx"
+// #load "queriesOverIQueryable/test.fsx"
+//
+// check "queriesOverIEnumerable/test.fsx" Core_queriesOverIEnumerable.RUN
+// check "queriesOverIQueryable/test.fsx" Core_queriesOverIQueryable.RUN
+
+// FAILED (repro1, repro2)
+//
+// #load "members/basics/test-hw.fsx"
+// check "members/basics/test.fsx" Core_members_basics.RUN
+
+// FAILED - https://github.com/fsharp/fsharp/issues/188
+//
+// #load "libtest/test.fsx"
+// check "libtest" Core_libtest.RUN
+
+// FAILED - https://github.com/fsharp/fsharp/issues/186
+//
+// #load "int32/test.fsx"
+// check "int32" Core_int32.RUN
+
+// FAILED (repro6, https://github.com/fsharp/fsharp/issues/187)
+//
+// #load "attributes/test.fsx"
+// check "attributes" Core_attributes.RUN
+
+// FAILS - takes too long
+//
+// #load "controlWebExt/test.fsx"
+// check "controlWebExt/test.fsx" Core_controlWebExt.RUN
+
+
+// FAILS - no DataSvcUtil.exe
+//
+// #load "queriesOverOData/test.fsx"
+// check "queriesOverOData/test.fsx" Core_queriesOverOData.RUN
+
+
match allErrors with
| [] ->
System.Console.WriteLine("ALL PASSED!")
@@ -115,35 +169,24 @@ match allErrors with
System.Console.WriteLine("FAILURE: {0} - {1}", dir, err)
exit 1
+
// ----------------------------------
(*
#load "csext/test.fsx"
#load "fsfromfsviacs/test.fsx"
#load "fsiAndModifiers/test.fsx"
-#load "genericmeasures/test.fsx"
#load "load-script/test.fsx"
#load "members/console/test.fsx"
-#load "math/lalgebra/test.fsx"
#load "math/lapack/test.fsx"
-#load "math/numbers/test.fsx"
-#load "math/numbersVS2008/test.fsx"
-#load "measures/test.fsx"
#load "mscorlib/test.fsx"
#load "pinvoke/test.fsx"
#load "portable/portablelibrary/test.fsx"
#load "printing/test.fsx"
#load "queriesOverIQueryableLinqToEntities/test.fsx"
#load "queriesOverIQueryableLinqToSql/test.fsx"
-#load "queriesOverOData/test.fsx"
#load "quotesInMultipleModules/test.fsx"
#load "topinit/test.fsx"
-
-#load "control/test.fsx"
-#load "controlChamenos/test.fsx"
-#load "controlMailbox/test.fsx"
-#load "controlStackOverflow/test.fsx"
-#load "controlWebExt/test.fsx"
#load "controlWpf/test.fsx"
*)
diff --git a/tests/fsharp/core/all.sh b/tests/fsharp/core/run-all.sh
similarity index 78%
rename from tests/fsharp/core/all.sh
rename to tests/fsharp/core/run-all.sh
index dcfe1d3..0c9fdfa 100644
--- a/tests/fsharp/core/all.sh
+++ b/tests/fsharp/core/run-all.sh
@@ -1,2 +1,2 @@
-mono ../../../lib/debug/fsc.exe --define:Portable --define:MONO --define:UNIX --define:ALL_IN_ONE --quotations-debug+ --debug+ ./all.fsx && mono ./all.exe
+mono ../../../lib/debug/fsc.exe --define:Portable --define:MONO --define:UNIX --define:ALL_IN_ONE --quotations-debug+ --debug+ ./run-all.fsx && mono ./run-all.exe
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git
More information about the Pkg-cli-apps-commits
mailing list