internal/impl: fix Has for proto3 scalars

The definition of Has for proto3 scalars is whether the value is non-zero.

Change-Id: I6aee92dd518d63a66515ad35da84b2be7aa22527
Reviewed-on: https://go-review.googlesource.com/c/150320
Reviewed-by: Herbie Ong <herbie@google.com>
Reviewed-by: Joe Tsai <joetsai@google.com>
diff --git a/internal/impl/message_test.go b/internal/impl/message_test.go
index 5852896..b3393d4 100644
--- a/internal/impl/message_test.go
+++ b/internal/impl/message_test.go
@@ -351,6 +351,12 @@
 			true, 2, 3, 4, 5, 6, 7, "8", []byte("9"), []byte("10"), "11",
 			true, 13, 14, 15, 16, 17, 18, "19", []byte("20"), []byte("21"), "22",
 		}},
+		setFields{
+			2: V(int32(-2)), 3: V(int64(-3)), 6: V(float32(math.Inf(-1))), 7: V(float64(math.NaN())),
+		},
+		hasFields{
+			2: true, 3: true, 6: true, 7: true,
+		},
 		clearFields{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22},
 		equalMessage{&ScalarProto3{}},
 	})