Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
Can you show the exact compilation error?  printf can be called with just one 
parameter, so it would be helpful to have more details.

Original comment by [email protected] on 22 Dec 2010 at 6:12

from randoop.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
Hi Michael,

Please find error below. --- 

java.lang.Error: Unresolved compilation problem: 
    The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String)

    at RandoopTest9.test1(RandoopTest9.java:10)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



Regards 

Rajeev Ranjan

Original comment by [email protected] on 22 Dec 2010 at 7:19

from randoop.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
The error message seems to be coming from Eclipse:  if a method is
erroneous, then it compiles it anyway, so that the rest of the class can
continue, but it replaces the body of the problematic method with

  throw new Error("unresolved compilation problem");

The problems can be caused by mismatches in versions of code on your
classpath, or other issues.  I presume that you are running Randoop from
within Eclipse, or using Eclipse in some other way.

Sorry, I can't be of any more help than that.  Maybe someone else can.

Original comment by [email protected] on 23 Dec 2010 at 11:28

from randoop.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
yes , i am running it from eclipse , i will now try to run it and recheck 
classpaths and other configurations. hope this will works



Original comment by [email protected] on 24 Dec 2010 at 7:21

from randoop.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
To follow up on this defect, the 'printf()' method was added to the PrintStream 
class in J2SE 5.0 -- not before -- and Randoop currently generates tests that 
are only J2SE 5.0+ compatible.

Furthermore, looking at the tests the only place it appears that the 'printf()' 
method call appears to be used is to print out the name of the test being 
executed when the debug flag is set (see below), which is clearly not required.

 if (debug) System.out.print("%nRandoopTest0.test37");

Any chance this issue will be fixed any time soon so that those of us dependent 
upon early versions of Java can make use of the tool?

Obviously, a workaround is to simply refactor all 'printf' calls to 'println' 
calls which isn't a huge issue but a pain nonetheless.


Original comment by [email protected] on 7 Jun 2011 at 8:01

from randoop.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
I changed Randoop (in changeset d060d77daf59) so that it uses println + print, 
rather than printf.  This addresses the most recent comment/request.  It might 
also fix the initial bug report, though we never had enough information to 
reproduce & understand the problem.  Let us know if the problem persists.

Original comment by [email protected] on 27 Nov 2011 at 5:52

  • Changed state: Fixed

from randoop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.