File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,15 @@ import (
44 "crypto/rand"
55 "fmt"
66 "math/big"
7- "os"
8- "strings"
7+ "testing"
98
109 "github.com/consensys/gnark/constraint/solver"
1110 "github.com/consensys/gnark/debug"
1211 "github.com/consensys/gnark/logger"
1312)
1413
1514func Bsb22CommitmentComputePlaceholder (mod * big.Int , _ []* big.Int , output []* big.Int ) (err error ) {
16- if ( len ( os . Args ) > 0 && ( strings . HasSuffix ( os . Args [ 0 ], ".test" ) || strings . HasSuffix ( os . Args [ 0 ], ".test.exe" )) ) || debug .Debug {
15+ if testing . Testing ( ) || debug .Debug {
1716 // usually we only run solver without prover during testing
1817 log := logger .Logger ()
1918 log .Error ().Msg ("Augmented commitment hint not replaced. Proof will not be sound and verification will fail!" )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ package logger
66import (
77 "io"
88 "os"
9- "strings "
9+ "testing "
1010
1111 "github.com/consensys/gnark/debug"
1212 "github.com/rs/zerolog"
@@ -18,7 +18,7 @@ func init() {
1818 output := zerolog.ConsoleWriter {Out : os .Stdout , TimeFormat : "15:04:05" }
1919 logger = zerolog .New (output ).With ().Timestamp ().Logger ()
2020
21- if ! debug .Debug && strings . HasSuffix ( os . Args [ 0 ], ".test" ) {
21+ if ! debug .Debug && testing . Testing ( ) {
2222 logger = zerolog .Nop ()
2323 }
2424
You can’t perform that action at this time.
0 commit comments