authorgravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2020-12-26 11:22:16-05:00
committergravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2020-12-26 11:22:16-05:00
log7f512f2236cf504775bb15002be89ecbb28a7679
tree7161c85cf2b76b7513aae75f4a2ce9b35fe85fd0
parent504c78c022567439d2ac43096ae19fc558bce8fc

fix test cases to use str zir inst instead of just a quoted string


1 files changed, 13 insertions(+), 9 deletions(-)

test/stage2/zir.zig+13-9
...@@ -150,18 +150,20 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -150,18 +150,20 @@ pub fn addCases(ctx: *TestContext) !void {
150 \\})150 \\})
151 \\151 \\
152 \\@a = fn(@fnty, {152 \\@a = fn(@fnty, {
153 \\ %0 = call(@b, [])153 \\ %0 = call(@c, [])
154 \\ %1 = returnvoid()154 \\ %1 = returnvoid()
155 \\})155 \\})
156 \\156 \\
157 \\@b = fn(@fnty, {157 \\@b = str("message")
158 \\ %9 = compileerror("message")158 \\
159 \\@c = fn(@fnty, {
160 \\ %9 = compileerror(@b)
159 \\ %0 = call(@a, [])161 \\ %0 = call(@a, [])
160 \\ %1 = returnvoid()162 \\ %1 = returnvoid()
161 \\})163 \\})
162 ,164 ,
163 &[_][]const u8{165 &[_][]const u8{
164 ":18:21: error: message",166 ":20:21: error: message",
165 },167 },
166 );168 );
167 // Now we remove the call to `a`. `a` and `b` form a cycle, but no entry points are169 // Now we remove the call to `a`. `a` and `b` form a cycle, but no entry points are
...@@ -179,20 +181,22 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -179,20 +181,22 @@ pub fn addCases(ctx: *TestContext) !void {
179 \\})181 \\})
180 \\182 \\
181 \\@a = fn(@fnty, {183 \\@a = fn(@fnty, {
182 \\ %0 = call(@b, [])184 \\ %0 = call(@c, [])
183 \\ %1 = returnvoid()185 \\ %1 = returnvoid()
184 \\})186 \\})
185 \\187 \\
186 \\@b = fn(@fnty, {188 \\@b = str("message")
187 \\ %9 = compileerror("message")189 \\
190 \\@c = fn(@fnty, {
191 \\ %9 = compileerror(@b)
188 \\ %0 = call(@a, [])192 \\ %0 = call(@a, [])
189 \\ %1 = returnvoid()193 \\ %1 = returnvoid()
190 \\})194 \\})
191 ,195 ,
192 \\@void = primitive(void)196 \\@void = primitive(void)
193 \\@fnty = fntype([], @void, cc=C)197 \\@fnty = fntype([], @void, cc=C)
194 \\@9 = declref("9__anon_2")198 \\@9 = declref("9__anon_3")
195 \\@9__anon_2 = str("entry")199 \\@9__anon_3 = str("entry")
196 \\@unnamed$4 = str("entry")200 \\@unnamed$4 = str("entry")
197 \\@unnamed$5 = export(@unnamed$4, "entry")201 \\@unnamed$5 = export(@unnamed$4, "entry")
198 \\@11 = primitive(void_value)202 \\@11 = primitive(void_value)