]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Serialization2.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Serialization2.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Serialization2.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Serialization2.scl
new file mode 100644 (file)
index 0000000..8384527
--- /dev/null
@@ -0,0 +1,14 @@
+import "Prelude"\r
+import "Serialization"\r
+\r
+rt :: IO a => a -> a\r
+rt v = readByteArray (writeByteArray v)\r
+\r
+main = show (\r
+  (rt "Hello", rt ()),\r
+  (rt 1.2 :: Double, rt 1.2 :: Float, 3 :: Integer, 4 :: Long),\r
+  rt (Just (1 :: Integer)),\r
+  (rt [1::Integer,2,3], rt [[1::Integer,2],[3,4]], fromDoubleArray (rt (toDoubleArray [3,2,1])))\r
+  )\r
+--\r
+(("Hello", ()), (1.2, 1.2, 3, 4), Just 1, ([1, 2, 3], [[1, 2], [3, 4]], [3.0, 2.0, 1.0]))
\ No newline at end of file