Sebastian-
I'm sorry Randoop was confusing you. Hopefully we can figure it out.
> I am using Randoop to generate a set of test cases for a method
> specified within the method list as follows
>
> method : blocks.timer.TON.execute(int,boolean,int)
>
> The generated test cases, however, don't follow the specified parameter
> types of the method's interface. For example, one generated test case
> for the method above features the following method invocation:
>
> boolean b8 = tON0.execute((int) '4', true, (int) '#');
I'm confused by your explanation of the problem. The first argument is
(int) '4'
which has type int, which is the declared type of the corresponding formal
parameter.
Likewise, all the other arguments have the same type as the formal
parameter.
If that weren't true, then the code wouldn't compile.
Is your objection that you wish that Randoop would optimize its tests and
output
52
instead of
(int) '4'
? Those two expressions are identical, and they even compile to the same
bytecodes. This optimization would only simplify the text of the test,
for the benefit of humans reading the tests.
Or is your objection that you don't want Randoop to discover and use the
value 52 as the first argument to TON.execute?
> How do I instrument Randoop to use the method's specified types and
> avoid casting primitive types?
I'm not sure what you mean by "instrument Randoop". Do you mean "change
Randoop"?
Thanks in advance for the clarifications.
-Mike