[MLton-commit] r5576

Vesa Karvonen vesak at mlton.org
Mon May 28 13:21:57 PDT 2007


Yet another example.
----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/misc-util/unstable/assoc-test.sml

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

Added: mltonlib/trunk/com/ssh/misc-util/unstable/assoc-test.sml
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/assoc-test.sml	2007-05-28 16:46:41 UTC (rev 5575)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/assoc-test.sml	2007-05-28 20:21:56 UTC (rev 5576)
@@ -0,0 +1,23 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+val () = let
+   open Type UnitTest
+
+   fun chkAssoc op + t =
+       chk (all (t &` t &` t)
+                (fn x & y & z =>
+                    that (eq t ((x + y) + z, x + (y + z)))))
+in
+   unitTests
+      (title "Assoc")
+
+      (chkAssoc op + word)
+
+      (chkAssoc op * real) (* This is supposed to fail. *)
+
+      $
+end


Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable/assoc-test.sml
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list