summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-06-17 11:02:30 -0400
committerOri Bernstein <ori@eigenstate.org>2014-06-17 11:02:30 -0400
commite94061ff1f2933cb0953aca60ee122342a5d4620 (patch)
tree4ecc51abbee932c061a54c2d9a91ae60a2bc10f0
parent0f633a972067bd188ec093d87772a49bd3e6d4f4 (diff)
downloadmc-e94061ff1f2933cb0953aca60ee122342a5d4620.tar.gz
Add one more test case for alignment.
-rw-r--r--test/align.myr6
-rw-r--r--test/data/align-expected1
2 files changed, 7 insertions, 0 deletions
diff --git a/test/align.myr b/test/align.myr
index 975ca75..d1c976f 100644
--- a/test/align.myr
+++ b/test/align.myr
@@ -1,5 +1,10 @@
use std
+/* size should be 1 */
+type alignstruct0 = struct
+ a : byte
+;;
+
/* size should be 16 */
type alignstruct1 = struct
a : byte
@@ -48,6 +53,7 @@ type alignstruct7 = struct
;;
const main = {
+ std.put("size = %i\n", sizeof(alignstruct0))
std.put("size = %i\n", sizeof(alignstruct1))
std.put("size = %i\n", sizeof(alignstruct2))
std.put("size = %i\n", sizeof(alignstruct3))
diff --git a/test/data/align-expected b/test/data/align-expected
index 23c24d2..11ea686 100644
--- a/test/data/align-expected
+++ b/test/data/align-expected
@@ -1,3 +1,4 @@
+size = 1
size = 16
size = 20
size = 20