ScalaTest in Eclipse

322 views
Skip to first unread message

Klaus

unread,
Jul 8, 2010, 6:48:16 PM7/8/10
to scalatest-users
I am trying to install ScalaTest in Eclipse, and I am not able to do
so.

I saw this one:

http://groups.google.com/group/scalatest-users/web/running-scalatest-from-eclipse

But this procedure does not work for me. The following examlple gives
type checking errors:

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FunSuite

@RunWith(classOf[JUnitRunner])
class MySuite extends FunSuite { <=== error 1
test("One plus one should be two") { <=== error 2
assert( 1 + 1 == 2)
}
}


error 1:
Multiple markers at this line
- illegal inheritance; self-type testmain.MySuite does not conform to
org.scalatest.FunSuite's selftype org.scalatest.FunSuite
- org.scalatest.FunSuite does not have a constructor
- illegal inheritance; superclass FunSuite is not a subclass of the
superclass Object of the mixin trait ScalaObject
- org.scalatest.FunSuite does not have a constructor
- illegal inheritance; self-type testmain.MySuite does not conform to
org{org.type}.scalatest{org.scalatest.type}.FunSuite's selftype
org.scalatest.FunSuite

error 2:
not found: value test


trenchguinea

unread,
Jul 8, 2010, 11:42:51 PM7/8/10
to scalatest-users
What version of ScalaTest and what version of Scala are you using?
This sounds suspiciously like something that might happen if you use
ScalaTest 1.0 (only compatible with Scala 2.7) against Scala 2.8,
though it could maybe the reverse problem as well (ScalaTest for 2.8
against Scala 2.7).

Until Scala 2.8 gets its official release, allowing the compatible
ScalaTest 1.2 to get released, you'll either have to work to ensure
the RCs and Snapshots are kept in sync or just stick to Scala 2.7.7
with ScalaTest 1.0 until the dust settles, the latter of which is my
approach.

On Jul 8, 5:48 pm, Klaus <havel...@gmail.com> wrote:
> I am trying to install ScalaTest in Eclipse, and I am not able to do
> so.
>
> I saw this one:
>
>  http://groups.google.com/group/scalatest-users/web/running-scalatest-...

Klaus Havelund

unread,
Jul 9, 2010, 1:29:25 AM7/9/10
to scalate...@googlegroups.com
On Thu, Jul 8, 2010 at 8:42 PM, trenchguinea <trench...@gmail.com> wrote:
What version of ScalaTest and what version of Scala are you using?

ScalaTest version: 1,0 - http://www.scalatest.org/download
Scala version: 2.8.0.RC7 -  http://www.scala-ide.org
(used the URL provided by the "Copy update site URL to clipboard" button)

This sounds suspiciously like something that might happen if you use
ScalaTest 1.0 (only compatible with Scala 2.7) against Scala 2.8,
though it could maybe the reverse problem as well (ScalaTest for 2.8
against Scala 2.7).

Apparently the former. But on the ScalaTest website it says:

  "You can download the ScalaTest 1.0 release (for Scala 2.7.3
    or higher) from here: ..."

Until Scala 2.8 gets its official release, allowing the compatible
ScalaTest 1.2 to get released, you'll either have to work to ensure
the RCs and Snapshots are kept in sync or just stick to Scala 2.7.7
with ScalaTest 1.0 until the dust settles, the latter of which is my
approach.

Ok thanks, that clarifies it.

Klaus
 
--
You received this message because you are subscribed to the Google
Groups "scalatest-users" group.
To post to this group, send email to scalate...@googlegroups.com
To unsubscribe from this group, send email to
scalatest-use...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/scalatest-users?hl=en
ScalaTest itself, and documentation, is available here:
http://www.artima.com/scalatest

Bill Venners

unread,
Jul 9, 2010, 1:56:01 AM7/9/10
to scalate...@googlegroups.com
Hi Klaus,

On Thu, Jul 8, 2010 at 10:29 PM, Klaus Havelund <have...@gmail.com> wrote:
>
>
> On Thu, Jul 8, 2010 at 8:42 PM, trenchguinea <trench...@gmail.com> wrote:
>>
>> What version of ScalaTest and what version of Scala are you using?
>
> ScalaTest version: 1,0 - http://www.scalatest.org/download
> Scala version: 2.8.0.RC7 -  http://www.scala-ide.org
> (used the URL provided by the "Copy update site URL to clipboard" button)
>
>> This sounds suspiciously like something that might happen if you use
>> ScalaTest 1.0 (only compatible with Scala 2.7) against Scala 2.8,
>> though it could maybe the reverse problem as well (ScalaTest for 2.8
>> against Scala 2.7).
>
> Apparently the former. But on the ScalaTest website it says:
>
>   "You can download the ScalaTest 1.0 release (for Scala 2.7.3
>     or higher) from here: ..."
>

Sorry that is confusing. I meant or higher on the 2.7.x branch. I'll
update the site to clarify.

Bill

--
Bill Venners
Artima, Inc.
http://www.artima.com

Kevin Wright

unread,
Jul 9, 2010, 3:27:57 AM7/9/10
to scalate...@googlegroups.com
Klaus,

you'll want to download scalatest for Scala 2.8.0.RC7 from here:


Kevin Wright

mail/google talk: kev.lee...@gmail.com
wave: kev.lee...@googlewave.com
skype: kev.lee.wright
twitter: @thecoda

Klaus Havelund

unread,
Jul 9, 2010, 9:29:09 AM7/9/10
to scalate...@googlegroups.com

Fantastic!! Thanks for all your responses.

Klaus
Reply all
Reply to author
Forward
0 new messages