diff --git a/src/fmt/scan_test.go b/src/fmt/scan_test.go index da0dfd19a2d..e8c5769924d 100644 --- a/src/fmt/scan_test.go +++ b/src/fmt/scan_test.go @@ -52,6 +52,7 @@ var ( uint16Val uint16 uint32Val uint32 uint64Val uint64 + uintptrVal uintptr float32Val float32 float64Val float64 stringVal string @@ -162,6 +163,7 @@ var scanTests = []ScanTest{ {"28\n", &uint16Val, uint16(28)}, {"29\n", &uint32Val, uint32(29)}, {"30\n", &uint64Val, uint64(30)}, + {"31\n", &uintptrVal, uintptr(31)}, {"255\n", &uint8Val, uint8(255)}, {"32767\n", &int16Val, int16(32767)}, {"2.3\n", &float64Val, 2.3}, @@ -247,6 +249,7 @@ var scanfTests = []ScanfTest{ {"%d", "74\n", &uint16Val, uint16(74)}, {"%d", "75\n", &uint32Val, uint32(75)}, {"%d", "76\n", &uint64Val, uint64(76)}, + {"%d", "77\n", &uintptrVal, uintptr(77)}, {"%b", "1001001\n", &uintVal, uint(73)}, {"%b", "100_1001\n", &uintVal, uint(4)}, {"%o", "075\n", &uintVal, uint(075)},