------------------------->  GNU Sather - sourcefile  <-------------------------
-- Copyright (C) 1995 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>  <--------------

-- Author: Benedict A. Gomes <gomes@samosa.ICSI.Berkeley.EDU>

class CHAR_TEST is
   -- Test of `CHAR'.
   
   include TEST;
   
   main is
      -- Test `CHAR'.
      class_name("CHAR");
	 -- is_alpha
      test("' '.is_alpha", ' '.is_alpha.str, "false");
      test("'.'.is_alpha", '.'.is_alpha.str, "false");
      test("'1'.is_alpha", '1'.is_alpha.str, "false");
      test("'a'.is_alpha", 'a'.is_alpha.str, "true");
      test("'A'.is_alpha", 'A'.is_alpha.str, "true");
      test("3.char.is_alpha", 3.char.is_alpha.str, "false");
	 -- is_upper
      test("' '.is_upper", ' '.is_upper.str, "false");
      test("'.'.is_upper", '.'.is_upper.str, "false");
      test("'1'.is_upper", '1'.is_upper.str, "false");
      test("'a'.is_upper", 'a'.is_upper.str, "false");
      test("'A'.is_upper", 'A'.is_upper.str, "true");
      test("3.char.is_upper", 3.char.is_upper.str, "false");
	 -- is_lower
      test("' '.is_lower", ' '.is_lower.str, "false");
      test("'.'.is_lower", '.'.is_lower.str, "false");
      test("'1'.is_lower", '1'.is_lower.str, "false");
      test("'a'.is_lower", 'a'.is_lower.str, "true");
      test("'A'.is_lower", 'A'.is_lower.str, "false");
      test("3.char.is_lower", 3.char.is_lower.str, "false");
	 -- is_digit
      test("' '.is_digit", ' '.is_digit.str, "false");
      test("'.'.is_digit", '.'.is_digit.str, "false");
      test("'1'.is_digit", '1'.is_digit.str, "true");
      test("'a'.is_digit", 'a'.is_digit.str, "false");
      test("'A'.is_digit", 'A'.is_digit.str, "false");
      test("3.char.is_digit", 3.char.is_digit.str, "false");
	 -- is_alphanum
      test("' '.is_alphanum", ' '.is_alphanum.str, "false");
      test("'.'.is_alphanum", '.'.is_alphanum.str, "false");
      test("'1'.is_alphanum", '1'.is_alphanum.str, "true");
      test("'a'.is_alphanum", 'a'.is_alphanum.str, "true");
      test("'A'.is_alphanum", 'A'.is_alphanum.str, "true");
      test("3.char.is_alphanum", 3.char.is_alphanum.str, "false");      
	 -- is_space
      test("' '.is_space", ' '.is_space.str, "true");
      test("'.'.is_space", '.'.is_space.str, "false");
      test("'1'.is_space", '1'.is_space.str, "false");
      test("'a'.is_space", 'a'.is_space.str, "false");
      test("'A'.is_space", 'A'.is_space.str, "false");
      test("3.char.is_space", 3.char.is_space.str, "false");
	 -- is_print
      test("' '.is_print", ' '.is_print.str, "true");
      test("'.'.is_print", '.'.is_print.str, "true");
      test("'1'.is_print", '1'.is_print.str, "true");
      test("'a'.is_print", 'a'.is_print.str, "true");
      test("'A'.is_print", 'A'.is_print.str, "true");
      test("3.char.is_print", 3.char.is_print.str, "false");
	 -- is_punct
      test("' '.is_punct", ' '.is_punct.str, "false");
      test("'.'.is_punct", '.'.is_punct.str, "true");
      test("'1'.is_punct", '1'.is_punct.str, "false");
      test("'a'.is_punct", 'a'.is_punct.str, "false");
      test("'A'.is_punct", 'A'.is_punct.str, "false");
      test("3.char.is_punct", 3.char.is_punct.str, "false");
	 -- is_control
      test("' '.is_control", ' '.is_control.str, "false");
      test("'.'.is_control", '.'.is_control.str, "false");
      test("'1'.is_control", '1'.is_control.str, "false");
      test("'a'.is_control", 'a'.is_control.str, "false");
      test("'A'.is_control", 'A'.is_control.str, "false");
      test("3.char.is_control", 3.char.is_control.str, "true");
	 -- other
      test("'a'.int", 'a'.int.str, "97");
      test("'a'.str", 'a'.str, "a");
      test("'a'.upper", 'a'.upper.str, "A");
      test("'A'.lower", 'A'.lower.str, "a");
      finish;
   end; 
   
end; 

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