Skip to content

Commit

Permalink
update file
Browse files Browse the repository at this point in the history
  • Loading branch information
wenlinlee committed Jun 24, 2024
1 parent ae45e62 commit 082e573
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .ci/ci_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e

bash gradlew verifyGoogleJavaFormat
bash gradlew build --info
bash gradlew build
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: brew install [email protected] openjdk
- name: run build test
if: runner.os == 'Windows'
run: ./gradlew.bat build --info
run: ./gradlew.bat build
- name: run integration testing
if: runner.os != 'Windows'
run: /bin/bash .ci/ci_check.sh
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/fisco/solc/compiler/Solc.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ public Solc(boolean sm, Version version) {
if (solc == null || !solc.exists()) {
initDefaultBundled(sm, version);
}
} catch (Exception e) {
} catch (IOException e) {
logger.error(" Can't init solc compiler, e: ", e);
e.printStackTrace();
throw new RuntimeException("Can't init solc compiler: ", e);
}
}
Expand Down
45 changes: 21 additions & 24 deletions src/test/java/org/fisco/solc/compiler/test/SolcTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,30 @@ public void smSolcTest() {

@Test
public void ecdsaSolcTest() {
try {
Solc solc = new Solc(false, Version.V0_4_25);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());

solc = new Solc(false, Version.V0_5_2);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());
Solc solc = new Solc(false, Version.V0_4_25);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());

solc = new Solc(false, Version.V0_5_2);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());

solc = new Solc(false, Version.V0_6_10);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());
solc = new Solc(false, Version.V0_6_10);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());

solc = new Solc(false, Version.V0_8_11);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());
solc = new Solc(false, Version.V0_8_11);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());

solc = new Solc(false, Version.V0_8_26);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());
} catch (Exception e) {
e.printStackTrace();
}
solc = new Solc(false, Version.V0_8_26);
Assert.assertNotNull(solc);
Assert.assertTrue(solc.getExecutable().exists());
Assert.assertTrue(solc.getExecutable().canExecute());
}
}

0 comments on commit 082e573

Please sign in to comment.