Skip to content

Commit

Permalink
Fix confusing error messages (#155)
Browse files Browse the repository at this point in the history
Fixed confusing error message in Biceps:C-5 test case

# Checklist

The following aspects have been respected by the author of this pull
request, confirmed by both pull request assignee **and** reviewer:

* Adherence to coding conventions
  * [X] Pull Request Assignee
  * [x] Reviewer
* Adherence to javadoc conventions
  * [X] Pull Request Assignee
  * [x] Reviewer
* Changelog update (necessity checked and entry added or not added
respectively)
  * [X] Pull Request Assignee
  * [x] Reviewer
* README update (necessity checked and entry added or not added
respectively)
  * [X] Pull Request Assignee
  * [x] Reviewer
* config update (necessity checked and entry added or not added
respectively)
  * [X] Pull Request Assignee
  * [x] Reviewer
* SDCcc executable ran against a test device (if necessary)
  * [X] Pull Request Assignee
  * [x] Reviewer
  • Loading branch information
midttuna authored Apr 18, 2024
1 parent 1d43723 commit 4caf0ff
Showing 1 changed file with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,26 +211,30 @@ void testRequirementC5() throws NoTestData, IOException {

} else if (modificationType.equals(DescriptionModificationType.CRT)) {
assertTrue(
descriptorBeforeReportOpt.isEmpty()
&& descriptorAfterReportOpt.isPresent(),
descriptorBeforeReportOpt.isEmpty(),
String.format(
"The descriptor with handle %s is present before applying the report"
+ " for modification type create",
modifiedDescriptor.getHandle()));
assertTrue(
descriptorAfterReportOpt.isPresent(),
String.format(
"The descriptor with handle %s is missing before applying the report:"
+ " %s and is present after applying the report: %s,"
"The descriptor with handle %s is missing after applying the report"
+ " for modification type create",
modifiedDescriptor.getHandle(),
descriptorBeforeReportOpt.isEmpty(),
descriptorAfterReportOpt.isPresent()));
modifiedDescriptor.getHandle()));
} else {
assertTrue(
descriptorBeforeReportOpt.isPresent()
&& descriptorAfterReportOpt.isEmpty(),
descriptorBeforeReportOpt.isPresent(),
String.format(
"The descriptor with handle %s is missing before applying the report"
+ " for modification type delete",
modifiedDescriptor.getHandle()));
assertTrue(
descriptorAfterReportOpt.isEmpty(),
String.format(
"The descriptor with handle %s is present before applying the report:"
+ " %s and is missing after applying the report: %s,"
"The descriptor with handle %s is present after applying the report"
+ " for modification type delete",
modifiedDescriptor.getHandle(),
descriptorBeforeReportOpt.isPresent(),
descriptorAfterReportOpt.isEmpty()));
modifiedDescriptor.getHandle()));
}
}
}
Expand Down

0 comments on commit 4caf0ff

Please sign in to comment.