ref: 9d11b6dbcecb0ed2013043bbff1dea9ac0355c7b
parent: c819f3a197d66c0f7c7c49aaffdf045bd4a46123
author: Ori Bernstein <ori@markovcorp.com>
date: Tue Feb 14 06:19:44 EST 2017
Add test for array alignment bug.
--- /dev/null
+++ b/test/arraypack.myr
@@ -1,0 +1,15 @@
+use std
+
+/* test for accidentally packed values */
+const a = [
+ (1, "foo"),
+ (2, "bar"),
+ (3, "baz"),
+]
+
+const main = {
+ for x in a[:]
+ std.put("{}", x)
+ ;;
+ std.put("\n")
+}
--- a/test/compoundimpl.myr
+++ b/test/compoundimpl.myr
@@ -21,7 +21,7 @@
}
const main = {
- var a = 123
+ var a = (123 : int)
var b = 'c'
foo(&a)
foo(&b)
--- a/test/tests
+++ b/test/tests
@@ -121,6 +121,7 @@
F matchmixed
B bigliteral P 34359738368
B arraylit-ni E 2
+B arraypack P '(1, foo)(2, bar)(3, baz)'
B arraypass P 1
B livearraylit E 21
# B arraylit E 3 ## BUGGERED