mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 20:20:40 +08:00
proc/variables: support NaN/Inf float values (#706)
Unfortunately go/constant does not support NaN and Inf float values so we need to store this information alongside. Fixes #705
This commit is contained in:
committed by
Derek Parker
parent
449b276fe1
commit
d89d115ef9
@ -448,6 +448,11 @@ func TestEvalExpression(t *testing.T) {
|
||||
{"str1[0:12]", false, "", "", "string", fmt.Errorf("index out of bounds")},
|
||||
{"str1[5:3]", false, "", "", "string", fmt.Errorf("index out of bounds")},
|
||||
|
||||
// NaN and Inf floats
|
||||
{"pinf", false, "+Inf", "+Inf", "float64", nil},
|
||||
{"ninf", false, "-Inf", "-Inf", "float64", nil},
|
||||
{"nan", false, "NaN", "NaN", "float64", nil},
|
||||
|
||||
// pointers
|
||||
{"*p2", false, "5", "5", "int", nil},
|
||||
{"p2", true, "*5", "(*int)(0x…", "*int", nil},
|
||||
|
||||
Reference in New Issue
Block a user