zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

testing_detect_test.zig (214B) - Raw


      1 const std = @import("std");
      2 const builtin = @import("builtin");
      3 const expect = std.testing.expect;
      4 
      5 test "builtin.is_test" {
      6     try expect(isATest());
      7 }
      8 
      9 fn isATest() bool {
     10     return builtin.is_test;
     11 }
     12 
     13 // test