22 lines
548 B
Smalltalk
22 lines
548 B
Smalltalk
"
|
|
A BreaQueryTest is a test class for testing the behavior of BreaQuery
|
|
"
|
|
Class {
|
|
#name : #BreaOperatorTest,
|
|
#superclass : #TestCase,
|
|
#category : #'Brea-Tests'
|
|
}
|
|
|
|
{ #category : #tests }
|
|
BreaOperatorTest >> testSTONSerialization [
|
|
|
|
| original store deserialized |
|
|
original := BreaOperator new
|
|
name: 'plus';
|
|
inputs: {'a' -> 3. 'b' -> 4} asDictionary;
|
|
codeBlock: [ :x :y | x + y ].
|
|
store := STON toString: original.
|
|
deserialized := (STONReader on: store readStream) next.
|
|
self assert: original execute equals: deserialized execute
|
|
]
|