github.com/consensys/gnark@v0.11.0/internal/backend/circuits/nocomputation.go (about) 1 package circuits 2 3 import ( 4 "github.com/consensys/gnark/frontend" 5 ) 6 7 // test circuit with no computational constraints 8 type noComputationCircuit struct { 9 A frontend.Variable `gnark:",public"` 10 B frontend.Variable 11 } 12 13 func (c *noComputationCircuit) Define(api frontend.API) error { 14 api.AssertIsEqual(c.A, c.B) 15 return nil 16 } 17 18 func init() { 19 20 var circuit, good, bad noComputationCircuit 21 22 good.A = (42) 23 good.B = (42) 24 25 bad.A = (42) 26 bad.B = (43) 27 28 addEntry("noComputationCircuit", &circuit, &good, &bad, nil) 29 }