[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] ObjectDumper
From: |
Markus Fritsche |
Subject: |
[Help-smalltalk] ObjectDumper |
Date: |
Tue, 13 Aug 2002 21:50:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610 |
Hi!
Attached is a (failing) TestCase for ObjectDumper.
st> (ObjectDumperTest new) setUp; testStringDump!
Object: ByteArray new: 1024 "<0x0>" error: Invalid argument S: must be
an Integer
ByteArray(Object)>>#primError:
SystemExceptions WrongClass(Exception)>>#defaultAction
[] in Exception class>>#coreException
SystemExceptions WrongClass(Signal)>>#activateHandler:
SystemExceptions WrongClass(Exception)>>#signal
Smalltalk SystemExceptions WrongClass class>>#signalOn:mustBe:
Smalltalk SystemExceptions WrongClass class>>#signalOn:mustBe:
ByteArray(Object)>>#checkIndexableBounds:put:
ByteArray(Object)>>#at:put:
ByteArray(SequenceableCollection)>>#replaceFrom:to:with:startingAt:
ByteStream>>#nextPutAll:
ObjectDumper>>#storeGlobal:
ObjectDumper>>#storeClass:
ObjectDumper>>#primDump:
[] in ObjectDumper>>#dump:
BlockClosure>>#ensure:
ObjectDumper>>#dump:
ObjectDumperTest>>#testStringDump
UndefinedObject>>#executeStatements
Is this the expected behaviour? I thougt (without having books on
smalltalk, only the source :-) that "ByteStream on: ByteArray" and
FileStream should have the same behaviour, shouldn't they? Or did I do
something completely weird?
Regards, Markus
"Filed out from GNU Smalltalk version 2.0b on 13-Aug-2002 21:42:57"!
TestCase subclass: #ObjectDumperTest
instanceVariableNames: 'stream '
classVariableNames: ''
poolDictionaries: ''
category: nil!
ObjectDumperTest comment:
nil!
!ObjectDumperTest methodsFor: 'Running'!
setUp
stream := ByteStream on: (ByteArray new: 1024)! !
!ObjectDumperTest methodsFor: 'Testing'!
testArrayClassDump
(ObjectDumper on: stream) dump: Array.
stream reset.
self should: [ (ObjectDumper on: stream) load == Array ]!
testArrayInstanceDump
(ObjectDumper on: stream) dump: #('asdf' 1 2 $a).
stream reset.
self should: [ (ObjectDumper on: stream) load == #('asdf' 1 2 $a) ]!
testMethodDump
| method |
method := thisContext method.
(ObjectDumper on: stream) dump: method.
stream reset.
self should: [ (ObjectDumper on: stream) load == method ]!
testRecursiveDump
| array secondArray |
array := Array new: 1.
array at: 1 put: array.
(ObjectDumper on: stream) dump: array.
stream reset.
secondArray := (ObjectDumper on: stream).
self should: [ secondArray == (secondArray at: 1) ]!
testSingletonDump
(ObjectDumper on: stream) dump: Processor.
stream reset.
self should: [ (ObjectDumper on: stream) load == Processor ]!
testStringDump
(ObjectDumper on: stream) dump: 'asdf'.
stream reset.
self should: [ (ObjectDumper on: stream) load == 'asdf' ]! !
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-smalltalk] ObjectDumper,
Markus Fritsche <=