mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
13 lines
371 B
Zig
13 lines
371 B
Zig
const std = @import("std");
|
|
const math = std.math;
|
|
const testing = std.testing;
|
|
|
|
test "fn reflection" {
|
|
try testing.expect(@typeInfo(@TypeOf(testing.expect)).Fn.params[0].type.? == bool);
|
|
try testing.expect(@typeInfo(@TypeOf(testing.tmpDir)).Fn.return_type.? == testing.TmpDir);
|
|
|
|
try testing.expect(@typeInfo(@TypeOf(math.Log2Int)).Fn.is_generic);
|
|
}
|
|
|
|
// test
|