aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNoam Preil <pleasantatk@gmail.com>2020-07-09 15:38:54 -0400
committerNoam Preil <pleasantatk@gmail.com>2020-07-13 01:49:04 -0400
commit3bad1c16ccbe9d77df373a0dbbe934dccac13175 (patch)
tree7a965444ba29e01816da57cbc7fad0485b389eae /test
parent2c882b2e651386399fd48c24302fd2d4ba430ef3 (diff)
downloadzig-3bad1c16ccbe9d77df373a0dbbe934dccac13175.tar.gz
zig-3bad1c16ccbe9d77df373a0dbbe934dccac13175.zip
Get basic return test working
Diffstat (limited to 'test')
-rw-r--r--test/stage2/cbe.zig44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/stage2/cbe.zig b/test/stage2/cbe.zig
index 5961ab4c0c..e642489b01 100644
--- a/test/stage2/cbe.zig
+++ b/test/stage2/cbe.zig
@@ -65,26 +65,26 @@ pub fn addCases(ctx: *TestContext) !void {
\\}
\\
);
- //ctx.c("basic return", linux_x64,
- // \\fn main() u8 {
- // \\ return 103;
- // \\}
- // \\
- // \\export fn _start() noreturn {
- // \\ _ = main();
- // \\}
- //,
- // \\#include <stdint.h>
- // \\
- // \\uint8_t main(void);
- // \\
- // \\noreturn void _start(void) {
- // \\ (void)main();
- // \\}
- // \\
- // \\uint8_t main(void) {
- // \\ return 103;
- // \\}
- // \\
- //);
+ ctx.c("basic return", linux_x64,
+ \\fn main() u8 {
+ \\ return 103;
+ \\}
+ \\
+ \\export fn _start() noreturn {
+ \\ _ = main();
+ \\}
+ ,
+ \\#include <stdint.h>
+ \\
+ \\uint8_t main(void);
+ \\
+ \\noreturn void _start(void) {
+ \\ (void)main();
+ \\}
+ \\
+ \\uint8_t main(void) {
+ \\ return 103;
+ \\}
+ \\
+ );
}