Skip to content

Commit

Permalink
Disabled test which fails on 2.8.1. due to bug in Enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppenejsum committed Nov 4, 2011
1 parent e2a287d commit 50162e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ import net.liftweb.http.jquery.{JqSHtml}
import scala.xml.NodeSeq
import js._

/**
* Warning: Do not use unnamed Enumerations with 2.8.1 as this will cause too many items to be displayed in the dropdown.
*
* See https://issues.scala-lang.org/browse/SI-3687 for details
*/
abstract class MappedEnum[T<:Mapper[T], ENUM <: Enumeration](val fieldOwner: T, val enum: ENUM) extends MappedField[ENUM#Value, T] {
private var data: ENUM#Value = defaultValue
private var orgData: ENUM#Value = defaultValue
Expand All @@ -54,6 +59,7 @@ abstract class MappedEnum[T<:Mapper[T], ENUM <: Enumeration](val fieldOwner: T,
if (value != data) {
data = value
dirty_?(true)

}
data
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ class EnumObj extends LongKeyedMapper[EnumObj] with IdPK {
object enum extends MappedEnum(this, MyEnum)
}


object EnumObj extends EnumObj with LongKeyedMetaMapper[EnumObj]


object MappedEnumSpec extends Specification("MappedEnum Specification") {
"MappedEnum" should {
"preserve enumeration order when building display list" in {
skip("Will not work with Scala 2.8.1 https://issues.scala-lang.org/browse/SI-3687")
val v = EnumObj.create

import MyEnum._
Expand Down

0 comments on commit 50162e7

Please sign in to comment.