Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonykwok1992 committed Mar 13, 2024
1 parent 1d56059 commit b9898fe
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public static List<Method> extractValidMethods(Class contract) {
&& parametersAreMatching(m)
&& !m.getName().toLowerCase().contains("event")
&& !m.getName().equals("load")
&& !m.getName().equals("kill"))
&& !m.getName().equals("kill")
&& !m.getName().equals("linkLibraries"))
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ private void compareJavaFile(String inputFileName) throws Exception {
"java",
inputFileName + ".java"),
File.separator));
assertEquals(
new String(Files.readAllBytes(fileExpected.toPath())).replaceAll("(\r\n|\n)", ""),
new String(Files.readAllBytes(fileActual.toPath())).replaceAll("(\r\n|\n)", ""));
String s1 = new String(Files.readAllBytes(fileExpected.toPath()));
String s2 = new String(Files.readAllBytes(fileActual.toPath()));
assertEquals(s1.replaceAll("(\r\n|\n)", ""), s2.replaceAll("(\r\n|\n)", ""));
}

private void testCodeGenerationJvmTypes(String contractName, String inputFileName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/
@SuppressWarnings("rawtypes")
public class ArraysInStruct extends Contract {
public static final String BINARY = "Bin file was not provided";
public static String BINARY = "Bin file was not provided";

public static final String FUNC_CALLFUNCTION = "callFunction";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
@SuppressWarnings("rawtypes")
public class EventParameters extends Contract {
public static final String BINARY = "Bin file was not provided";
public static String BINARY = "Bin file was not provided";

public static final String FUNC__CONTRACTNUMBER = "_contractNumber";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
@SuppressWarnings("rawtypes")
public class OnlyInArrayStruct extends Contract {
public static final String BINARY = "Bin file was not provided";
public static String BINARY = "Bin file was not provided";

public static final String FUNC_GETFOO = "getFoo";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,11 @@ public int hashCode() {
+ (getMaxFeePerBlobGasRaw() != null
? getMaxFeePerBlobGasRaw().hashCode()
: 0);
result = 31 * result + (getBlobVersionedHashes() != null ? getBlobVersionedHashes().hashCode() : 0);
result =
31 * result
+ (getBlobVersionedHashes() != null
? getBlobVersionedHashes().hashCode()
: 0);
result = 31 * result + (getAccessList() != null ? getAccessList().hashCode() : 0);
return result;
}
Expand Down

0 comments on commit b9898fe

Please sign in to comment.