diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 07:44:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 0db7861d9da09e059fa1b9e40fff5cd52add27f2 (patch) | |
| tree | 6e95dfa36e07b3234b1d5cdb990b11f95c184a3f /test/lib/build.zig | |
| parent | d3742ddf2b3a85eb3935cb35e958fa27f1293a6b (diff) | |
| parent | dee94c740bdaea61ff35b4e0a7f1d2815c9ee441 (diff) | |
| download | pardes-0db7861d9da09e059fa1b9e40fff5cd52add27f2.tar.gz pardes-0db7861d9da09e059fa1b9e40fff5cd52add27f2.zip | |
integration: the text pane a library (pardes-editor), with the GPU move, the terminal, the plumber and the diff work
A merge of pardes-next (wmrtztwl) and editor-lib (rlumrxuq), no conflicts. Gated against the baseline of the integration line (.scratch/sketch/gpu/mbase): the merge with the library before its follow-up, in full: frame corpus 77/77 identical in Debug and in ReleaseFast, the gated window -0.019% instructions (threshold 0.5%), unit-test on gui 1584/1592 with no failure the baseline has not; this merge: corpus 77/77 in Debug, unit-test on gui 1584/1592, on tui core-test 811/950 (139 skipped), shell-test 990/993, lib-test, hxdiff 658, parity 738, hxgolf 124, hxlib 538 and its parity 618, all 0 mismatches, replicas pass.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/lib/build.zig')
| -rw-r--r-- | test/lib/build.zig | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/test/lib/build.zig b/test/lib/build.zig index 6cd8d6e5..436517d4 100644 --- a/test/lib/build.zig +++ b/test/lib/build.zig @@ -1,18 +1,34 @@ //! A package that depends on pardes for its library, as a program that draws //! source text itself would: pardes's `lib-test` step runs `zig build test` //! here, so the `pardes-syntax` module is built the way such a package -//! builds it (build.zig's `library`), with the minimal grammars. +//! builds it (build.zig's `library`), with the minimal grammars, and +//! `pardes-editor`, the text pane as a library, which it asks for. const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const pardes = b.dependency("pardes", .{ .target = target, .optimize = optimize, .@"tree-sitter" = .minimal }); - const tests = b.addTest(.{ .root_module = b.createModule(.{ + const pardes = b.dependency("pardes", .{ .target = target, .optimize = optimize, .@"tree-sitter" = .minimal, .editor = true }); + const step = b.step("test", "colour, outline and walk a C and a Zig source through pardes's library, and edit a text with its editor"); + // A file belongs to one module: the syntax alone, and the editor (which + // has it as `.syntax`), each a test of its own. + for ([_][2][]const u8{ .{ "lib.zig", "pardes-syntax" }, .{ "editor.zig", "pardes-editor" } }) |t| { + const tests = b.addTest(.{ .root_module = b.createModule(.{ + .target = target, + .optimize = optimize, + .root_source_file = b.path(t[0]), + .imports = &.{.{ .name = t[1], .module = pardes.module(t[1]) }}, + }) }); + step.dependOn(&b.addRunArtifact(tests).step); + } + // What a key costs, a page count and a parse: `zig build bench -- <KiB> <keys>`. + const bench = b.addExecutable(.{ .name = "bench", .root_module = b.createModule(.{ .target = target, .optimize = optimize, - .root_source_file = b.path("lib.zig"), - .imports = &.{.{ .name = "pardes-syntax", .module = pardes.module("pardes-syntax") }}, + .root_source_file = b.path("bench.zig"), + .imports = &.{.{ .name = "pardes-editor", .module = pardes.module("pardes-editor") }}, }) }); - b.step("test", "colour, outline and walk a C and a Zig source through pardes's library").dependOn(&b.addRunArtifact(tests).step); + const run_bench = b.addRunArtifact(bench); + run_bench.addPassthruArgs(); + b.step("bench", "a key typed into the library's editor at a size, its pages and a parse").dependOn(&run_bench.step); } |
