INNER CODE UNIT · Go

TestMarshalingEdgeCases

schollz/pake · pake_test.go:171

func TestMarshalingEdgeCases(t *testing.T) {
	// Test normal marshaling works
	A, err := InitCurve([]byte{1, 2, 3}, 0, "p256")
	if err != nil {
		t.Fatal(err)
	}
	bytes := A.Bytes()
	if len(bytes) == 0 {
		t.Error("Bytes() should return non-empty data")
	}

	// Test marshaling uninitialized pake
	var uninit *Pake
	defer func() {
		if r := recover(); r == nil {
			t.Error("Bytes() should panic for uninitialized pake")
		}
	}()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…