authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-01-11 02:43:06 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-01-11 02:43:06 -08:00
log19f736ddb9fa5d1b1ecdc0eb1597cf9ee52a537e
tree9b3252ba6cf35545599e548878588d97d31672f5
parent1d2c6517014b2e644135e18982a65067dd2eb6e7

add test


2 files changed, 46 insertions(+), 0 deletions(-)

build.zig+12
...@@ -13,6 +13,18 @@ pub fn build(b: *std.Build) void {...@@ -13,6 +13,18 @@ pub fn build(b: *std.Build) void {
13 if (std.mem.eql(u8, step, "generate")) {13 if (std.mem.eql(u8, step, "generate")) {
14 addExeStep(b, target, mode, "generate", "generate.zig", "Generate the bindings");14 addExeStep(b, target, mode, "generate", "generate.zig", "Generate the bindings");
15 }15 }
16
17 const tests = b.addTest(.{
18 .root_source_file = b.path("test.zig"),
19 .target = target,
20 .optimize = mode,
21 });
22 deps.addAllTo(tests);
23
24 const test_step = b.step("test", "Run all library tests");
25 const tests_run = b.addRunArtifact(tests);
26 tests_run.has_side_effects = true;
27 test_step.dependOn(&tests_run.step);
16}28}
1729
18fn addExeStep(b: *std.Build, target: std.Build.ResolvedTarget, mode: std.builtin.Mode, name: []const u8, root_src: []const u8, sdescription: []const u8) void {30fn addExeStep(b: *std.Build, target: std.Build.ResolvedTarget, mode: std.builtin.Mode, name: []const u8, root_src: []const u8, sdescription: []const u8) void {
test.zig created+34
...@@ -0,0 +1,34 @@
1const std = @import("std");
2const ucd = @import("unicode-ucd");
3
4test {
5 _ = &ucd.arabic_shaping.data;
6 _ = &ucd.bidi_brackets.data;
7 _ = &ucd.bidi_mirroring.data;
8 _ = &ucd.blocks.data;
9 _ = &ucd.cjk_radicals.data;
10 _ = &ucd.case_folding.data;
11 _ = &ucd.composition_exclusions.data;
12 _ = &ucd.derived_age.data;
13 _ = &ucd.derived_core_properties.data;
14 _ = &ucd.east_asian_width.data;
15 _ = &ucd.emoji_sources.data;
16 _ = &ucd.equivalent_unified_ideograph.data;
17 _ = &ucd.hangul_syllable_type.data;
18 _ = &ucd.indic_positional_category.data;
19 _ = &ucd.indic_syllabic_category.data;
20 _ = &ucd.jamo.data;
21 _ = &ucd.line_break.data;
22 _ = &ucd.name_aliases.data;
23 _ = &ucd.named_sequences.data;
24 _ = &ucd.named_sequences_prov.data;
25 _ = &ucd.prop_list.data;
26 _ = &ucd.scripts.data;
27 _ = &ucd.vertical_orientation.data;
28 _ = &ucd.emoji.data;
29 _ = &ucd.script_extensions.data;
30 _ = &ucd.property_aliases.data;
31 _ = &ucd.property_value_aliases.data;
32 _ = &ucd.unicode_data.data;
33 _ = &ucd.special_casing.data;
34}