Author Topic: JUnit support broken in SlickEdit 12.0.2 onwards?  (Read 4288 times)

jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
JUnit support broken in SlickEdit 12.0.2 onwards?
« on: November 21, 2007, 09:44:25 am »
Hi,

I've tried to run a simple JUnit test class in SlickEdit 12.0.3. It doesn't work. I get "No tests found" in the message area, and "Runs: 0" etc in the tool window.  (Actually, it's the example from my book! A reader pointed out the problem.)

This was working for me in SlickEdit 12.0.1. I confirmed this by re-installing SlickEdit 12.0.1, and that got it working again.

The junit.e, unittest.e and unittest.sh files have had some changes between 12.0.1 and 12.0.3. I tried loading the older versions of those files with SlickEdit 12.0.3, and they did make my simple example work again.

Can anyone from SlickEdit comment on these changes? Is there supposed to be some change in the way we invoke JUnit?

BTW I am using Java 1.6.0_02. I tried on both Windows and Linux and got the same results.

Regards

John Hurst
Wellington, New Zealand

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: JUnit support broken in SlickEdit 12.0.2 onwards?
« Reply #1 on: November 26, 2007, 07:52:56 pm »
Hey John,

You might have already discovered this, but the fix for this issue is the one pointed out by mrothman in the Junit 4.x support thread:

Quote
2) In the slick-c macro file unittest.e, make the last parameter to utTreeDoRecursively (userData) a reference - otherwise the information about child nodes in the project tree gets lost as the call to this function unwinds.

I'll be adding this to the cumulative hotfix for 12.0.3...sorry for the delayed response.

- Ryan

jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
Re: JUnit support broken in SlickEdit 12.0.2 onwards?
« Reply #2 on: November 27, 2007, 06:16:08 am »
Thanks Ryan,

I had seen the JUnit 4 thread but didn't realize it was relevant to problems in JUnit 3.8 support. (I didn't look very carefully!)  Indeed, this fixed the problem.

Thanks

John Hurst
Wellington, New Zealand