Skip to content

Commit

Permalink
Merge branch 'main-eisop' of github.com:jspecify/jspecify-reference-c…
Browse files Browse the repository at this point in the history
…hecker into use-eisop
  • Loading branch information
wmdietl committed Dec 14, 2023
2 parents 8d43524 + b9828b4 commit 49cfc8a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ jobs:
env:
SHALLOW: 1
- name: Check out jspecify/samples-google-prototype
if: always()
run: git -C ../jspecify checkout samples-google-prototype
if: always()
- name: Run Samples Tests
if: always()
uses: gradle/gradle-build-action@v2
with:
arguments: jspecifySamplesTest
Expand Down
8 changes: 6 additions & 2 deletions src/test/java/tests/ConformanceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package tests;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static java.util.Objects.requireNonNull;
Expand All @@ -35,6 +34,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
Expand Down Expand Up @@ -84,6 +84,7 @@
*/
@RunWith(JUnit4.class)
public final class ConformanceTest {
private static final Logger logger = Logger.getLogger(ConformanceTest.class.getCanonicalName());

private static final ImmutableList<String> OPTIONS =
ImmutableList.of(
Expand Down Expand Up @@ -242,7 +243,10 @@ public String toString() {
*/
private static String fixType(String type) {
Matcher matcher = TYPE.matcher(type);
checkArgument(matcher.matches(), "did not match for \"%s\"", type);
if (!matcher.matches()) {
logger.warning(String.format("type \"%s\" did not match /%s/", type, TYPE.pattern()));
return type;
}
String args = matcher.group("args");
String suffix = matcher.group("suffix");
if (args == null && suffix != null) {
Expand Down
17 changes: 9 additions & 8 deletions tests/ConformanceTest-report.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# 12 pass; 6 fail; 18 total; 66.7% score
PASS: Basic.java:26 test:expression-type:Object?:nullable
PASS: Basic.java:26 test:sink-type:Object!:return
PASS: Basic.java:26 test:cannot-convert:Object? to Object!
PASS: Basic.java:32 test:expression-type:Object!:nonNull
PASS: Basic.java:32 test:sink-type:Object?:return
PASS: Basic.java:39 test:sink-type:Object?:nullableObject
PASS: Basic.java:41 test:sink-type:String!:testSinkType#nonNullString
# 12 pass; 7 fail; 19 total; 63.2% score
PASS: Basic.java:28 test:expression-type:Object?:nullable
PASS: Basic.java:28 test:sink-type:Object!:return
PASS: Basic.java:28 test:cannot-convert:Object? to Object!
PASS: Basic.java:34 test:expression-type:Object!:nonNull
PASS: Basic.java:34 test:sink-type:Object?:return
PASS: Basic.java:41 test:sink-type:Object?:nullableObject
PASS: Basic.java:43 test:sink-type:String!:testSinkType#nonNullString
FAIL: Basic.java:49 test:expression-type:List!<capture of ? extends String?>:nullableStrings
PASS: Basic.java: no unexpected facts
PASS: Irrelevant.java:28 test:irrelevant-annotation:Nullable
PASS: Irrelevant.java:34 test:irrelevant-annotation:Nullable
Expand Down

0 comments on commit 49cfc8a

Please sign in to comment.