Files
harbour-core/harbour/tests/clasname.prg
Viktor Szakats 0d37a4455b 2012-11-26 22:47 UTC+0100 Viktor Szakats (harbour syenar.net)
* src/rtl/Makefile
  + src/rtl/hbtest.prg
  * include/harbour.hbx
    + added simple regression test framework in core, so
      such tests can be easily added to contribs and 3rd
      party projects. It's based on the engine used in
      hbtest.
      Usage:
          #include "hbtest.ch"
          HBTEST <expression> IS <expected value>
      F.e.:
          HBTEXT 2 + 2 IS 4

  * contrib/hbgt/tests/test.prg
    + use the new experimental regression test framework
      in core.

  * utils/hbmk2/hbmk2.prg
    + added note to help text about scripts being executed
      under a default codepage of UTF-8

  * contrib/gtwvg/class.prg
  * contrib/gtwvg/dataref.prg
  * contrib/gtwvg/drawarea.prg
  * contrib/gtwvg/menubar.prg
  * contrib/gtwvg/wnd.prg
  * contrib/hbamf/readme.txt
  * contrib/hbgd/gd.prg
  * contrib/hbhttpd/core.prg
  * contrib/hbtip/mail.prg
  * contrib/xhb/cstruct.prg
  * contrib/xhb/dumpvar.prg
  * contrib/xhb/xdbmodst.prg
  * extras/hbdoc/genhtml.prg
  * extras/httpsrv/session.prg
  * src/debug/debugger.prg
  * src/rtl/tgetlist.prg
  * src/rtl/tobject.prg
  * src/rtl/valtoexp.prg
  * tests/clasname.prg
  * utils/hbmk2/hbmk2.prg
    * :CLASSNAME -> :CLASSNAME()

  * contrib/hbct/addascii.c
  * contrib/hbct/charmirr.c
  * contrib/hbct/charrepl.c
  * contrib/hbct/charsort.c
  * contrib/hbct/charswap.c
  * contrib/hbct/justify.c
  * contrib/hbct/pos2.c
  * contrib/hbct/relation.c
  * contrib/hbct/wordrepl.c
  * contrib/hbgt/chrcount.c
  * extras/gfspell/spellc.c
    * minor cleanups

  * utils/hbtest/hbtest.prg
  * utils/hbtest/rt_main.ch
    * cleanups
2012-11-26 22:02:46 +00:00

57 lines
1.3 KiB
Plaintext

//NOTEST
/*
* $Id$
*/
// The following code tests the application of the className method
// against the "fundemental" types of Clipper.
// These tests were written by Dave Pearson <davep@hagbard.demon.co.uk>
// and are placed into the public domain.
PROCEDURE Main()
// First, try all the types. This checks that the VM can cope.
AEval( { NIL, {}, "", 0, CToD( "" ), .F., {|| NIL }, ErrorNew() }, ;
{| x | QOut( x:className() ) } )
// Now try against values "in the code". This checks that the
// compiler can cope.
?
? NIL:className()
? {}:className()
? "":className()
? 0:className()
? CToD( "" ):className()
? .F. :className()
? {|| NIL }:className()
? ErrorNew():className()
// For fun, do it again while ensuring the parser doesn't care about
// whitespace.
?
? NIL : className()
? {} : className()
? "" : className()
? 0 : className()
? CToD( "" ) : className()
? .F. : className()
? {|| NIL } : className()
? ErrorNew() : className()
// Now for some sillier ones. If the above work the following should
// work too.
?
? ( NIL:className() ):className()
?
? ( ( NIL:className() ):className() ):className()
RETURN