mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-23 06:45:19 +00:00
Fix constant conversion checks (#6104)
This commit is contained in:
@@ -58,14 +58,14 @@ test_issue_6068 :: proc(t: ^testing.T) {
|
||||
testing.expect(t, f64be(-1.234) == check_be)
|
||||
testing.expect(t, cast(f64be)value == check_be)
|
||||
testing.expect(t, cast(f64be)-1.234 == check_be)
|
||||
testing.expect(t, f64be(int(-1.234)) == check_be)
|
||||
testing.expect(t, cast(f64be)int(-1.234) == check_be)
|
||||
testing.expect(t, f64be(f64(-1.234)) == check_be)
|
||||
testing.expect(t, cast(f64be)f64(-1.234) == check_be)
|
||||
testing.expect(t, f64le(value) == check_le)
|
||||
testing.expect(t, f64le(-1.234) == check_le)
|
||||
testing.expect(t, cast(f64le)value == check_le)
|
||||
testing.expect(t, cast(f64le)-1.234 == check_le)
|
||||
testing.expect(t, f64le(int(-1.234)) == check_le)
|
||||
testing.expect(t, cast(f64le)int(-1.234) == check_le)
|
||||
testing.expect(t, f64le(f64(-1.234)) == check_le)
|
||||
testing.expect(t, cast(f64le)f64(-1.234) == check_le)
|
||||
testing.expect(t, f64le(reverse) == check_le)
|
||||
testing.expect(t, cast(f64le)reverse == check_le)
|
||||
|
||||
@@ -74,14 +74,14 @@ test_issue_6068 :: proc(t: ^testing.T) {
|
||||
testing.expect(t, f64be(-1.234) == -1.234)
|
||||
testing.expect(t, cast(f64be)value == -1.234)
|
||||
testing.expect(t, cast(f64be)-1.234 == -1.234)
|
||||
testing.expect(t, f64be(int(-1.234)) == -1.234)
|
||||
testing.expect(t, cast(f64be)int(-1.234) == -1.234)
|
||||
testing.expect(t, f64be(f64(-1.234)) == -1.234)
|
||||
testing.expect(t, cast(f64be)f64(-1.234) == -1.234)
|
||||
testing.expect(t, f64le(value) == -1.234)
|
||||
testing.expect(t, f64le(-1.234) == -1.234)
|
||||
testing.expect(t, cast(f64le)value == -1.234)
|
||||
testing.expect(t, cast(f64le)-1.234 == -1.234)
|
||||
testing.expect(t, f64le(int(-1.234)) == -1.234)
|
||||
testing.expect(t, cast(f64le)int(-1.234) == -1.234)
|
||||
testing.expect(t, f64le(f64(-1.234)) == -1.234)
|
||||
testing.expect(t, cast(f64le)f64(-1.234) == -1.234)
|
||||
testing.expect(t, f64le(reverse) == -1.234)
|
||||
testing.expect(t, cast(f64le)reverse == -1.234)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user