Skip to content

Commit

Permalink
must start beClass and notBeClass
Browse files Browse the repository at this point in the history
Issue: TNG#60
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
  • Loading branch information
Michael Sherman committed Jun 19, 2018
1 parent 55c3108 commit 60899d5
Show file tree
Hide file tree
Showing 3 changed files with 389 additions and 2,054 deletions.
Expand Up @@ -467,7 +467,7 @@ private static ArchCondition<JavaClass> residesConditionForPredicate(final Descr
@Override
public void check(JavaClass item, ConditionEvents events) {
boolean satisfied = resideInAPackage.apply(item);
String message = String.format("Class %s %s %s in %s",
String message = String.format("class %s %s %s in %s",
item.getName(),
satisfied ? "does" : "doesn't",
resideInAPackage.getDescription(),
Expand Down
Expand Up @@ -1153,7 +1153,7 @@ static String locationPattern(Class<?> clazz) {
return String.format("\\(%s.java:0\\)", quote(clazz.getSimpleName()));
}

private String singleLineFailureReportOf(EvaluationResult result) {
static String singleLineFailureReportOf(EvaluationResult result) {
return result.getFailureReport().toString().replaceAll("\\r?\\n", FAILURE_REPORT_NEWLINE_MARKER);
}

Expand All @@ -1166,7 +1166,7 @@ public boolean apply(JavaAnnotation input) {
};
}

private static String containsPartOfRegex(String fullString) {
static String containsPartOfRegex(String fullString) {
return String.format(".*%s.*", fullString.substring(1, fullString.length() - 1));
}

Expand Down Expand Up @@ -1194,7 +1194,7 @@ private static DescribedPredicate<JavaCall<?>> callTargetIs(Class<?> type) {
return JavaCall.Predicates.target(owner(type(type))).as("target is " + type.getSimpleName());
}

private static DescribedPredicate<JavaAccess<?>> accessTargetIs(Class<?> type) {
static DescribedPredicate<JavaAccess<?>> accessTargetIs(Class<?> type) {
return JavaAccess.Predicates.target(owner(type(type))).as("target is " + type.getSimpleName());
}

Expand Down Expand Up @@ -1233,7 +1233,7 @@ private void checkTestStillValid(String thePackage,
}
}

private Pattern accessesFieldRegex(Class<?> origin, String accessType, Class<?> targetClass, String fieldName) {
static Pattern accessesFieldRegex(Class<?> origin, String accessType, Class<?> targetClass, String fieldName) {
String originAccesses = String.format("%s[^%s]* %s", quote(origin.getName()), FAILURE_REPORT_NEWLINE_MARKER, accessType);
String target = String.format("[^%s]*%s\\.%s", FAILURE_REPORT_NEWLINE_MARKER, quote(targetClass.getName()), fieldName);
return Pattern.compile(String.format(".*%s field %s.*", originAccesses, target));
Expand Down

0 comments on commit 60899d5

Please sign in to comment.