mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
12 lines
386 B
Zig
12 lines
386 B
Zig
const std = @import("std");
|
|
const math = std.math;
|
|
const testing = std.testing;
|
|
|
|
test "fn reflection" {
|
|
try testing.expectEqual(bool, @typeInfo(@TypeOf(testing.expect)).@"fn".params[0].type.?);
|
|
try testing.expectEqual(testing.TmpDir, @typeInfo(@TypeOf(testing.tmpDir)).@"fn".return_type.?);
|
|
|
|
try testing.expect(@typeInfo(@TypeOf(math.Log2Int)).@"fn".is_generic);
|
|
}
|
|
|
|
// test
|