shithub: mc

Download patch

ref: 53d4b23c3f4dc40f8f3d78343b35b12495193fcf
parent: b0bb18ea0c30216319410faf536cb09bc0f31e99
author: Ori Bernstein <[email protected]>
date: Thu Jun 7 11:35:44 EDT 2012

Add test for struct assignment.

--- a/Makefile
+++ b/Makefile
@@ -4,5 +4,5 @@
 -include config.mk
 include mk/c.mk
 
-check:
+check: all
 	make -C test check
--- /dev/null
+++ b/test/structasn.myr
@@ -1,0 +1,13 @@
+type pair = struct
+	a : int
+	b : int
+;;
+
+const main = {
+	var x : pair
+	var y : pair
+	x.a = 12
+	x.b = 30
+	y = x
+	-> y.a + y.b
+}
--- a/test/tests
+++ b/test/tests
@@ -12,3 +12,4 @@
 fib	E	21
 slice	E	7
 float   E       1
+structasn       E       42