[MLton-commit] r5950

Vesa Karvonen vesak at mlton.org
Sat Aug 25 10:59:21 PDT 2007


Just formatting.

----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/unit-test/unstable/example/qc-test.sml

----------------------------------------------------------------------

Modified: mltonlib/trunk/com/ssh/unit-test/unstable/example/qc-test.sml
===================================================================
--- mltonlib/trunk/com/ssh/unit-test/unstable/example/qc-test.sml	2007-08-25 16:37:17 UTC (rev 5949)
+++ mltonlib/trunk/com/ssh/unit-test/unstable/example/qc-test.sml	2007-08-25 17:59:21 UTC (rev 5950)
@@ -4,8 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-(*
- * This file contains simple examples of specifying QuickCheck -style
+(* This file contains simple examples of specifying QuickCheck -style
  * randomized tests using the UnitTest framework.  The example laws
  * are from the QuickCheck paper by Koen Claessen and John Hughes.
  *)
@@ -83,10 +82,9 @@
 
       (chk (all (sq int)
                 (fn (x, y) =>
-                    if x <= y then
-                       that (Int.max (x, y) = y)
-                    else
-                       skip)))
+                    if x <= y
+                    then that (Int.max (x, y) = y)
+                    else skip)))
 
       (* Read the above as:
        *
@@ -102,19 +100,17 @@
 
       (chk (all (int &` list int)
                 (fn x & xs =>
-                    if isSorted xs then
-                       (trivial (null xs))
-                          (that (isSorted (insert x xs)))
-                    else
-                       skip)))
+                    if isSorted xs
+                    then (trivial (null xs))
+                            (that (isSorted (insert x xs)))
+                    else skip)))
 
       (chk (all (int &` list int)
                 (fn x & xs =>
-                    if isSorted xs then
-                       (collect int (length xs))
-                          (that (isSorted (insert x xs)))
-                    else
-                       skip)))
+                    if isSorted xs
+                    then (collect int (length xs))
+                            (that (isSorted (insert x xs)))
+                    else skip)))
 
       (chk (all (int &` sortedList)
                 (fn x & xs =>




More information about the MLton-commit mailing list