summaryrefslogtreecommitdiff
path: root/libgo/go/crypto/elliptic/elliptic_test.go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 00:59:47 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 00:59:47 +0000
commit4a3da3a8a45d5496118798146de1fa4e5798ed5a (patch)
tree13beeaed3698c61903fe93fb1ce70bd9b18d4e7f /libgo/go/crypto/elliptic/elliptic_test.go
parentcd529f4d86a17a3e8959f2cb5ac7132a841ab6f1 (diff)
downloadgcc-4a3da3a8a45d5496118798146de1fa4e5798ed5a.tar.gz
runtime: Remove now unnecessary pad field from ParFor.
It is not needed due to the removal of the ctx field. Reviewed-on: https://go-review.googlesource.com/16525 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229616 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/crypto/elliptic/elliptic_test.go')
-rw-r--r--libgo/go/crypto/elliptic/elliptic_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libgo/go/crypto/elliptic/elliptic_test.go b/libgo/go/crypto/elliptic/elliptic_test.go
index 4dc27c92bf4..7e27913dcd0 100644
--- a/libgo/go/crypto/elliptic/elliptic_test.go
+++ b/libgo/go/crypto/elliptic/elliptic_test.go
@@ -19,6 +19,19 @@ func TestOnCurve(t *testing.T) {
}
}
+func TestOffCurve(t *testing.T) {
+ p224 := P224()
+ x, y := new(big.Int).SetInt64(1), new(big.Int).SetInt64(1)
+ if p224.IsOnCurve(x, y) {
+ t.Errorf("FAIL: point off curve is claimed to be on the curve")
+ }
+ b := Marshal(p224, x, y)
+ x1, y1 := Unmarshal(p224, b)
+ if x1 != nil || y1 != nil {
+ t.Errorf("FAIL: unmarshalling a point not on the curve succeeded")
+ }
+}
+
type baseMultTest struct {
k string
x, y string