Files
harbour-core/harbour/tests/testpers.prg
Dave Pearson afd1f7aa86 2002-01-25 14:25 UTC+0000 Dave Pearson <davep@davep.org>
* tests/testpers.prg
     - Removed the use of cName, it hasn't been supported for a long time
       and it was stopping this test from working.
2002-01-25 14:28:51 +00:00

43 lines
783 B
Plaintext

//
// $Id$
//
// Class HBPersistent test
#include "hbclass.ch"
function Main()
local oTest := Test():New()
local oTest2 := Test2():New()
oTest:One = "hello"
oTest:Two = 123
oTest:Three = "this value is not persistent"
oTest:Four = oTest2 // We store another persistent object here
oTest2:Five = "some more text"
? oTest:SaveToText() // We save it to a text
oTest:SaveToFile( "test.txt" ) // We save it to a file
return nil
CLASS Test FROM HBPersistent
DATA One PROPERTY
DATA Two PROPERTY
DATA Three
DATA Four PROPERTY
METHOD Another() INLINE { 1, { "One", "Two" }, Date() } PROPERTY
METHOD More() VIRTUAL
ENDCLASS
CLASS Test2 FROM HBPersistent
DATA Five PROPERTY
ENDCLASS