-
Notifications
You must be signed in to change notification settings - Fork 283
Clean up/enable StringBuilder.append tests #4862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
String s = sb.toString(); | ||
assert(s.equals("fg")); | ||
} | ||
public static void nondet(String stringArg, int intArg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where intArg is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not. Removed.
String s = sb.toString(); | ||
assert(s.equals("fg")); | ||
} | ||
public static void nondet(String stringArg, int intArg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ the name suggest there should also be a det
test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests for deterministic inputs are in the StringBuilderAppend[01] folders.
c8ec34b
to
62ceb1b
Compare
--function test.nondet --max-nondet-string-length 1000 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::test.nondet:(Ljava/lang/String;)V.assertion.1" | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
\[.*assertion\.1\] .* line 9 .* FAILURE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the other two assertions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm testing per-property, so the other assertions are checked in the two other desc files. Is that what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 62ceb1b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/117650646
Some StringBuilder tests were marked as FUTURE and caused by https://github.com/diffblue/test-gen/issues/434.
This seems now fixed, so I moved the tests to the main StringBuilder.append tests and enabled them, but I added a
--max-nondet-string-length 1000
option. Not sure whether these tests should always pass without the option.@romainbrenguier do you think we can remove it (the tests don't fail locally without the option, but I'm worried they might at a later time)?