Files
harbour-core/tests/clasname.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

54 lines
1.2 KiB
Plaintext

//NOTEST
// 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