------------------------->  GNU Sather - sourcefile  <-------------------------
-- Copyright (C) 199x by International Computer Science Institute            --
-- This file is part of the GNU Sather library. It is free software; you may --
-- redistribute  and/or modify it under the terms of the GNU Library General --
-- Public  License (LGPL)  as published  by the  Free  Software  Foundation; --
-- either version 2 of the license, or (at your option) any later version.   --
-- This  library  is distributed  in the  hope that it will  be  useful, but --
-- WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See Doc/LGPL for more details.       --
-- The license text is also available from:  Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     --
-------------->  Please email comments to <bug-sather@gnu.org>  <--------------

immutable class V is
   attr s:STR;
   attr i:INT;
   str:STR is
      return i.str+" "+s;
   end;
end;

class TEST_SHARED is
   include R_TEST;
   shared i:INT;
   shared v:V;
   shared s:STR;
   shared oi:INT;
   shared ov:V;
   shared os:STR;
   test_out(out outi:INT,out outv:V,out outs:STR) is
      outi:=99;
      vv:V;
      vv:=vv.s("hallo out").i(11);
      outv:=vv;
      outs:="muhhh out";
   end;
   main is
      class_name("SHAREDS");
      par
         fork@1%clusters
	    i:=9;
	    vv:V;
	    vv:=vv.s("hallo").i(10);
	    v:=vv;
	    s:="muhhh";
	    test_out(out oi,out ov,out os);
	 end;
      end;
      test("INT",i,9);
      test("STR",s,"muhhh");
      test("V",v.str,"10 hallo");
      test("INT",oi,99);
      test("STR",os,"muhhh out");
      test("V",ov.str,"11 hallo out");
      finish;
   end;
end;
