-
Notifications
You must be signed in to change notification settings - Fork 10
Fix test/glojure/test_glojure/numbers.glj failures #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,17 +143,17 @@ | |
| [:input [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 math.MaxInt64 math.MaxFloat32 math.MaxFloat64]] | ||
| [char [:error (char 0) (char 1) (char 127) (char 32767) :error :error :error :error]] | ||
| ;; In go, char == rune, which is equivalent to int32 | ||
| [unchecked-char [(Char -1) (Char 0) (Char 1) (Char 127) (Char 32767) (Char math.MaxInt32) (Char -1) (Char -1) (Char -1)]] | ||
| [unchecked-char [(Char -1) (Char 0) (Char 1) (Char 127) (Char 32767) (Char math.MaxInt32) (Char -1) (Char 0) (Char 0)]] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, for extreme inputs, the behavior turns out to be system-dependent; the unchecked casts intentionally map (nearly) directly to go casts to The right approach here might be one of:
2 is interesting, but there's no great way to be exhaustive. 1 seems adequate. What do you think?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly I just wanted to not see the failures for these when running I'd be fine with just disabling these tests for now. Maybe comment them out with TODO text explaining why. BTW, I'm close to submitting a PR that fixes issues with basic I'm in the Clojure slack, if you want to chat more easily :) |
||
| ;; bytes are unsigned in go | ||
| [byte [255 0 1 math.MaxInt8 :error :error :error :error :error]] | ||
| ;; bytes are unsigned in go | ||
| [unchecked-byte [255 0 1 math.MaxInt8 255 255 255 255 255]] | ||
| [unchecked-byte [255 0 1 math.MaxInt8 255 255 255 0 0]] | ||
| [short [-1 0 1 math.MaxInt8 math.MaxInt16 :error :error :error :error]] | ||
| [unchecked-short [-1 0 1 math.MaxInt8 math.MaxInt16 -1 -1 -1 -1]] | ||
| [unchecked-short [-1 0 1 math.MaxInt8 math.MaxInt16 -1 -1 0 0]] | ||
| [int [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 max-int-res :error :error]] | ||
| [unchecked-int [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 max-int-res max-int-res max-int-res]] | ||
| [unchecked-int [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 max-int-res -9223372036854775808 -9223372036854775808]] | ||
| [long [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 math.MaxInt64 :error :error]] | ||
| [unchecked-long [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 math.MaxInt64 math.MaxInt64 math.MaxInt64]] | ||
| [unchecked-long [-1 0 1 math.MaxInt8 math.MaxInt16 math.MaxInt32 math.MaxInt64 -9223372036854775808 -9223372036854775808]] | ||
| ;; 2.14748365E9 if when float/double conversion is avoided... | ||
| [float [-1.0 0.0 1.0 127.0 32767.0 2.147483648E9 9.223372036854776E18 math.MaxFloat32 :error]] | ||
| [unchecked-float [-1.0 0.0 1.0 127.0 32767.0 2.147483648E9 9.223372036854776E18 math.MaxFloat32 (go/float32 (math.Inf 1))]] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!