Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
public class AssertionIssue {

public static void throwAssertion() {
throw new AssertionError("Something went terribly wrong.", new ThrowableAssertion());
}

public static class ThrowableAssertion extends Throwable {
@Override
public String getMessage() {
return "How did we get here?";
}
}
}
8 changes: 8 additions & 0 deletions regression/cbmc-java/assertion_error_constructors/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
AssertionIssue.class
--function AssertionIssue.throwAssertion
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
--
^warning: ignoring
4 changes: 2 additions & 2 deletions src/goto-programs/builtin_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,11 +969,11 @@ void goto_convertt::do_function_call_symbol(

copy(function_call, FUNCTION_CALL, dest);

if(arguments.size()!=1 && arguments.size()!=2)
if(arguments.size() != 1 && arguments.size() != 2 && arguments.size() != 3)
{
error().source_location=function.find_source_location();
error() << "`" << identifier
<< "' expected to have one or two arguments" << eom;
<< "' expected to have one, two or three arguments" << eom;
throw 0;
}

Expand Down