| 1 | const std = @import("std"); |
| 2 | const expectEqual = std.testing.expectEqual; |
| 3 | |
| 4 | test "implicit integer to float" { |
| 5 | var int: u8 = 123; |
| 6 | _ = ∫ |
| 7 | const float: f32 = int; |
| 8 | const int_from_float: u8 = @intFromFloat(float); |
| 9 | try expectEqual(int, int_from_float); |
| 10 | } |
| 11 | |
| 12 | // test |