| author | |
| committer | |
| log | d959faa4c78ded05ac457e93a16edfd1d7c58c0e |
| tree | 4703b772dcc998d5dba876d0701b796f0516f2df |
| parent | bea9e9c7f8abc1e270dd2ea0065934b32627288c |
4 files changed, 20 insertions(+), 0 deletions(-)
test/build_examples.zig+1| ... | ... | @@ -14,6 +14,7 @@ pub fn addCases(cases: &tests.BuildExamplesContext) void { |
| 14 | 14 | cases.addBuildFile("example/mix_o_files/build.zig"); |
| 15 | 15 | } |
| 16 | 16 | cases.addBuildFile("test/standalone/issue_339/build.zig"); |
| 17 | cases.addBuildFile("test/standalone/issue_794/build.zig"); | |
| 17 | 18 | cases.addBuildFile("test/standalone/pkg_import/build.zig"); |
| 18 | 19 | cases.addBuildFile("test/standalone/use_alias/build.zig"); |
| 19 | 20 | cases.addBuildFile("test/standalone/brace_expansion/build.zig"); |
test/standalone/issue_794/a_directory/foo.h created+1| ... | ... | @@ -0,0 +1 @@ |
| 1 | #define NUMBER 1234 |
test/standalone/issue_794/build.zig created+11| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | const Builder = @import("std").build.Builder; | |
| 2 | ||
| 3 | pub fn build(b: &Builder) void { | |
| 4 | const test_artifact = b.addTest("main.zig"); | |
| 5 | test_artifact.addIncludeDir("a_directory"); | |
| 6 | ||
| 7 | b.default_step.dependOn(&test_artifact.step); | |
| 8 | ||
| 9 | const test_step = b.step("test", "Test the program"); | |
| 10 | test_step.dependOn(&test_artifact.step); | |
| 11 | } |
test/standalone/issue_794/main.zig created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | const c = @cImport(@cInclude("foo.h")); | |
| 2 | const std = @import("std"); | |
| 3 | const assert = std.debug.assert; | |
| 4 | ||
| 5 | test "c import" { | |
| 6 | comptime assert(c.NUMBER == 1234); | |
| 7 | } |