func TestNegScalarBaseMulG2(t *testing.T) {
	b, _ := rand.Int(rand.Reader, bn256.Order)
	pb := new(bn256.G2).ScalarBaseMult(b)
	mb := Sub(new(big.Int).SetInt64(0), b)
	mpb := new(bn256.G2).ScalarBaseMult(mb)
	a := new(bn256.G2).Add(pb, mpb)
	if a.IsZero() != true {
		t.Errorf("Assert failure: expected true, actual: %t", a.IsZero())
	}
}
/*
Tests Inversion on G2 group.
package zkproofs
import (
	"testing"
	"math/big"
	"crypto/rand"
	"fmt"
	"github.com/ing-bank/zkproofs/go-ethereum/crypto/bn256"
	"time"
)
func TestDecompose(t *testing.T) {
	h := GetBigInt("925")
	decx, _ := Decompose(h, 10, 3)	
	if decx[0] != 5 || decx[1] != 2 || decx[2] != 9 {
		t.Errorf("Assert failure: expected true, actual: %d", decx)
	}
}
func TestNegScalarBaseMulG1(t *testing.T) {
	b, _ := rand.Int(rand.Reader, bn256.Order)
	pb := new(bn256.G1).ScalarBaseMult(b)
	mb := Sub(new(big.Int).SetInt64(0), b)
	mpb := new(bn256.G1).ScalarBaseMult(mb)
	a := new(bn256.G1).Add(pb, mpb)
	aBytes := a.Marshal()
	fmt.Println(aBytes)
	fmt.Println(a)
	for i := 0; i < len(aBytes)-1; i++ {
		if aBytes[i] != 0 {
			t.Errorf("Assert failure: expected true, actual: %t", aBytes[i] == 0)
		}
	}
	if aBytes[len(aBytes)-1] != 1 {
		t.Errorf("Assert failure: expected true, actual: %t", aBytes[len(aBytes)-1] == 1)
	}
}