shithub: mc

Download patch

ref: e94061ff1f2933cb0953aca60ee122342a5d4620
parent: 0f633a972067bd188ec093d87772a49bd3e6d4f4
author: Ori Bernstein <[email protected]>
date: Tue Jun 17 07:02:30 EDT 2014

Add one more test case for alignment.

--- 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 @@
 ;;
 
 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))
--- a/test/data/align-expected
+++ b/test/data/align-expected
@@ -1,3 +1,4 @@
+size = 1
 size = 16
 size = 20
 size = 20