RegressionTests__MemoryTest.st
author Claus Gittinger <cg@exept.de>
Fri, 29 Apr 2016 14:06:07 +0200
changeset 1407 18f5a9e9c677
parent 1252 5bc6d5729453
child 1447 2351db93aa5b
child 1499 26a16a04219b
permissions -rw-r--r--
#QUALITY by cg class: RegressionTests::StreamTests added: #test40_eolMode

"{ Package: 'exept:regression' }"

"{ NameSpace: RegressionTests }"

TestCase subclass:#MemoryTest
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'tests-Regression-RuntimeSystem'
!

!MemoryTest class methodsFor:'documentation'!

documentation
"
    documentation to be added.

    [author:]
        Michael Beyl (mb@bart)

    [instance variables:]

    [class variables:]

    [see also:]

"
!

history
    "Created: / 14.10.2003 / 17:53:03 / mb"
! !

!MemoryTest methodsFor:'tests'!

test1
    "cg: whoever wrote this test: 
         please add some comment on what is actually tested"

    |x y z|
    1 to: 100 do: [:rep|
    x := XML::Element tag:'x'.
    ObjectMemory garbageCollect.

    x attributes: (Array with: (XML::Attribute name: 'a' value: '1')
      with: (XML::Attribute name: 'a' value: '1')).
    1 to: 500 do: [:i |
      x addNode: (y := XML::Element tag: 'y').
     y attributes: (Array with: (XML::Attribute name: 'a' value: '1')
      with: (XML::Attribute name: 'a' value: '1')).
      1 to: 1000 do: [:j |
        y addNode: (z := XML::Element tag: 'y').
     z attributes: (Array with: (XML::Attribute name: 'a' value: '1')
      with: (XML::Attribute name: 'a' value: '1')).]].
    ObjectMemory garbageCollect.
    x nodesDo: [:el |
     (el isKindOf: XML::Element)
       ifTrue: [(el attributeNamed:'a')
        value: ((el valueOfAttribute:'a' ifAbsent:[]) asNumber * 10 / 3 ) asString]
    ].
    ]

    "
     self run:#test1
     self new test1
    "
! !

!MemoryTest class methodsFor:'documentation'!

version
    ^ '$Header$'
! !