zig/test/stage2/spu-ii.zig

24 lines
585 B
Zig
Raw Normal View History

2020-08-20 00:45:34 +08:00
const std = @import("std");
2020-09-22 12:14:01 +08:00
const TestContext = @import("../../src/test.zig").TestContext;
2020-08-20 00:45:34 +08:00
const spu = std.zig.CrossTarget{
.cpu_arch = .spu_2,
.os_tag = .freestanding,
};
pub fn addCases(ctx: *TestContext) !void {
{
var case = ctx.exe("SPU-II Basic Test", spu);
case.addCompareOutput(
\\fn killEmulator() noreturn {
\\ asm volatile ("undefined0");
\\ unreachable;
\\}
\\
\\export fn _start() noreturn {
\\ killEmulator();
\\}
, "");
}
}