]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Serialization2.scl
Merge commit '876ede6'
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Serialization2.scl
1 import "Prelude"\r
2 import "Serialization"\r
3 \r
4 rt :: IO a => a -> a\r
5 rt v = readByteArray (writeByteArray v)\r
6 \r
7 main = show (\r
8   (rt "Hello", rt ()),\r
9   (rt 1.2 :: Double, rt 1.2 :: Float, 3 :: Integer, 4 :: Long),\r
10   rt (Just (1 :: Integer)),\r
11   (rt [1::Integer,2,3], rt [[1::Integer,2],[3,4]], fromDoubleArray (rt (toDoubleArray [3,2,1])))\r
12   )\r
13 --\r
14 (("Hello", ()), (1.2, 1.2, 3, 4), Just 1, ([1, 2, 3], [[1, 2], [3, 4]], [3.0, 2.0, 1.0]))