mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
Zig programs now debug under CodeLLDB with sourceLanguages: [] so expressions aren't evaluated as Rust; the context menu of a closed .zig file reads its content; rerunning failed tests of a zig build test step derives a standalone zig test from the module root detect/zig.rs records per step (zig build forwards no args to the test binary). Adds the zig-app fixture's failing test step and run/debug smoke cases. The Language smoke CI job for zig is left for a separate change. Part of #3260 Co-authored-by: akbar1214 <43771058+akbar1214@users.noreply.github.com>
11 lines
335 B
Zig
11 lines
335 B
Zig
const std = @import("std");
|
|
const tally = @import("tally");
|
|
|
|
pub fn main() !void {
|
|
const prices = [_]u32{ 4999, 2499, 5999 };
|
|
const sum = tally.total(&prices);
|
|
var buf: [16]u8 = undefined;
|
|
// Set a breakpoint here (QA: debugger) and inspect `sum`.
|
|
std.debug.print("Total: {s}\n", .{try tally.format(&buf, sum)});
|
|
}
|