<commit_before>%%%
%%% Authors:
%%%   <NAME> (<EMAIL>)
%%%
%%% Copyright:
%%%   <NAME>, 1998
%%%
%%% Last change:
%%%   $Date$ by $Author$
%%%   $Revision$
%%%
%%% This file is part of Mozart, an implementation
%%% of Oz 3
%%%    $MOZARTURL$
%%%
%%% See the file "LICENSE" or
%%%    $LICENSEURL$
%%% for information on usage and redistribution
%%% of this file, and for a DISCLAIMER OF ALL
%%% WARRANTIES.
%%%


local
   local
      fun {Deref A}
         case A of blocked(A) then {Deref A} else A end
      end
   in
      fun {Ask S}
         {Deref {Space.askVerbose S}}
      end
   end

   fun {RawTest P1 P2}
      thread
         try E={P1} in {P2 E}
         catch _ then false
         end
      end
   end

in

   fun {DoTest T}
      case T
      of test(P1 P2) then
         {RawTest P1 P2}
      [] equal(P1 X) then
         {RawTest P1 fun {$ E} E==X end}
      [] entailed(P0) then
         {RawTest
          fun {$}
             S={Space.new proc {$ _}
                             try {P0}
                             catch _ then fail
                             end
                          end}
          in
             {Ask S}
          end
          fun {$ X} X==succeeded(entailed) end}
      [] failed(P0) then
         {RawTest
          fun {$}
             S={Space.new proc {$ _}
                             try {P0}
                             catch _ then skip
                             end
                          end}
          in
             {Ask S}
          end
          fun {$ X} X==failed end}
      [] suspended(P0) then
         {RawTest
          fun {$}
             S={Space.new proc {$ _}
                             try {P0}
                             catch _ then fail
                             end
                          end}
          in
             {Ask S}
          end
          fun {$ X} X==succeeded(suspended) end}
      else
         {RawTest fun {$} {T} true end fun {$ X} X end}
      end
   end

end<commit_msg>Bug fix in test engine (unary procedures are okay now)<commit_after>%%%
%%% Authors:
%%%   <NAME> (<EMAIL>)
%%%
%%% Copyright:
%%%   <NAME>, 1998
%%%
%%% Last change:
%%%   $Date$ by $Author$
%%%   $Revision$
%%%
%%% This file is part of Mozart, an implementation
%%% of Oz 3
%%%    $MOZARTURL$
%%%
%%% See the file "LICENSE" or
%%%    $LICENSEURL$
%%% for information on usage and redistribution
%%% of this file, and for a DISCLAIMER OF ALL
%%% WARRANTIES.
%%%


local
   local
      fun {Deref A}
         case A of blocked(A) then {Deref A} else A end
      end
   in
      fun {Ask S}
         {Deref {Space.askVerbose S}}
      end
   end

   fun {RawTest P1 P2}
      thread
         try E={P1} in {P2 E}
         catch _ then false
         end
      end
   end

in

   fun {DoTest T}
      case T
      of test(P1 P2) then
         {RawTest P1 P2}
      [] equal(P1 X) then
         {RawTest P1 fun {$ E} E==X end}
      [] entailed(P0) then
         {RawTest
          fun {$}
             S={Space.new proc {$ _}
                             try {P0}
                             catch _ then fail
                             end
                          end}
          in
             {Ask S}
          end
          fun {$ X} X==succeeded(entailed) end}
      [] failed(P0) then
         {RawTest
          fun {$}
             S={Space.new proc {$ _}
                             try {P0}
                             catch _ then skip
                             end
                          end}
          in
             {Ask S}
          end
          fun {$ X} X==failed end}
      [] suspended(P0) then
         {RawTest
          fun {$}
             S={Space.new proc {$ _}
                             try {P0}
                             catch _ then fail
                             end
                          end}
          in
             {Ask S}
          end
          fun {$ X} X==succeeded(suspended) end}
      elsecase {Procedure.arity T}
      of 0 then
         {RawTest fun {$} {T} true end fun {$ X} X end}
      [] 1 then
         {RawTest T fun {$ X} X end}
      end
   end

end
{'fraction_non_alphanumeric': 0.10922330097087378, 'fraction_numerical': 0.010679611650485437, 'mean_word_length': 1.0250614250614252, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2105011', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1237, 'n_words': 393}