From 7c1797cb2ffc4999984360901a89452f972b86cb Mon Sep 17 00:00:00 2001 From: Gabriel-Trintinalia Date: Thu, 27 Apr 2023 13:14:52 +1000 Subject: [PATCH] Remove static tracer --- .../linea/zktracer/module/alu/add/AddTracer.java | 4 ++-- .../linea/zktracer/specs/AddTracerBySpecTest.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/consensys/linea/zktracer/module/alu/add/AddTracer.java b/src/main/java/net/consensys/linea/zktracer/module/alu/add/AddTracer.java index 13ca74fd5e..0bd6d58f84 100644 --- a/src/main/java/net/consensys/linea/zktracer/module/alu/add/AddTracer.java +++ b/src/main/java/net/consensys/linea/zktracer/module/alu/add/AddTracer.java @@ -27,12 +27,12 @@ import org.apache.tuweni.units.bigints.UInt256; public class AddTracer implements ModuleTracer { - + public static final String ADD_JSON_KEY = "add"; private int stamp = 0; @Override public String jsonKey() { - return "add"; + return ADD_JSON_KEY; } @Override diff --git a/src/test/java/net/consensys/linea/zktracer/specs/AddTracerBySpecTest.java b/src/test/java/net/consensys/linea/zktracer/specs/AddTracerBySpecTest.java index 03f22ea849..1637620a2a 100644 --- a/src/test/java/net/consensys/linea/zktracer/specs/AddTracerBySpecTest.java +++ b/src/test/java/net/consensys/linea/zktracer/specs/AddTracerBySpecTest.java @@ -14,20 +14,20 @@ */ package net.consensys.linea.zktracer.specs; +import static net.consensys.linea.zktracer.module.alu.add.AddTracer.ADD_JSON_KEY; + import net.consensys.linea.zktracer.AbstractModuleTracerBySpecTest; import net.consensys.linea.zktracer.module.ModuleTracer; import net.consensys.linea.zktracer.module.alu.add.AddTracer; public class AddTracerBySpecTest extends AbstractModuleTracerBySpecTest { - static ModuleTracer tracer = new AddTracer(); - public static Object[][] specs() { - return findSpecFiles(new String[] {tracer.jsonKey()}); + return findSpecFiles(new String[] {ADD_JSON_KEY}); } @Override protected ModuleTracer getModuleTracer() { - return tracer; + return new AddTracer(); } }