-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package trap | ||
|
||
import ( | ||
"math" | ||
"testing" | ||
) | ||
|
||
// these should compile | ||
// see bug https://github.com/xhd2015/xgo/issues/53 | ||
|
||
const SET_EMPTY_STRING = "<empty>" | ||
const SET_ZERO = math.MaxInt64 - 1 | ||
const SET_ZERO_UINT = math.MaxUint64 - 1 | ||
const SET_ZERO_INT32 = math.MaxInt32 - 1 | ||
const SET_ZERO_UINT32 = math.MaxUint32 - 1 | ||
|
||
func TestMathMaxShouldCompile(t *testing.T) { | ||
zero := uint64(SET_ZERO_UINT) | ||
if zero != math.MaxUint64-1 { | ||
t.Fatalf("zero: %v", zero) | ||
} | ||
} |