Permalink
Browse files

Merged issues 1283

  • Loading branch information...
2 parents bfdffdd + 8941dfe commit 35ea02d04b9c3b8861ad056ca6459cdb4fcdce3c @dpp dpp committed Jul 1, 2012
View
@@ -12,7 +12,7 @@ startYear in ThisBuild := Some(2006)
organizationName in ThisBuild := "WorldWide Conferencing, LLC"
-crossScalaVersions in ThisBuild := Seq("2.9.2", "2.9.1-1", "2.9.1", "2.9.0-1", "2.9.0", "2.8.2", "2.8.1", "2.8.0")
+crossScalaVersions in ThisBuild := Seq("2.9.2", "2.9.1-1", "2.9.1", "2.9.0-1", "2.9.0", "2.8.2", "2.8.1")
libraryDependencies in ThisBuild <++= scalaVersion { sv => Seq(specs, scalacheck).map(_(sv)) }
@@ -102,7 +102,7 @@ trait ListHelpers {
}
loop(old.toList, newList.toList)
-
+
ret.toList
}
@@ -167,8 +167,10 @@ trait ListHelpers {
/**
* Convert a java.util.Enumeration to a List[T]
*/
- def enumToList[T](enum: java.util.Enumeration[T]): List[T] =
- scala.collection.JavaConversions.enumerationAsScalaIterator(enum).toList
+ def enumToList[T](enum: java.util.Enumeration[T]): List[T] = {
+ import scala.collection.JavaConversions._
+ enum.toList
+ }
/**
* Convert a java.util.Enumeration to a List[String] using the toString method on each element
View
@@ -1,7 +1,7 @@
@echo off
@REM Internal options, always specified
-set INTERNAL_OPTS=-Dfile.encoding=UTF-8 -Xmx768m -noverify -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m
+set INTERNAL_OPTS=-Dfile.encoding=UTF-8 -Xmx768m -noverify -XX:ReservedCodeCacheSize=96m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m
@REM Add 64bit specific option
java -version 2>&1 | find "64-Bit" >nul:
@@ -43,6 +43,11 @@ import Helpers._
object MongoFieldSpec extends Specification("MongoField Specification") with MongoTestKit {
import fixtures._
+ val session = new LiftSession("", randomString(20), Empty)
+ def inLiftSession(a: =>Any) = S.initIfUninitted(session) { a }
+ new SpecContext {
+ aroundExpectations(inLiftSession(_))
+ }
def passBasicTests[A](
example: A,
mandatory: MandatoryTypedField[A],
@@ -39,6 +39,11 @@ import scala.xml.{NodeSeq, Elem, Node, Text}
* Systems under specification for RecordField.
*/
object FieldSpec extends Specification("Record Field Specification") {
+ val session = new LiftSession("", randomString(20), Empty)
+ def inLiftSession(a: =>Any) = S.initIfUninitted(session) { a }
+ new SpecContext {
+ aroundExpectations(inLiftSession(_))
+ }
def passBasicTests[A](example: A, mandatory: MandatoryTypedField[A], legacyOptional: MandatoryTypedField[A], optional: OptionalTypedField[A])(implicit m: scala.reflect.Manifest[A]): Unit = {
val canCheckDefaultValues =
!mandatory.defaultValue.isInstanceOf[Calendar] // don't try to use the default value of date/time typed fields, because it changes from moment to moment!
@@ -285,16 +290,19 @@ object FieldSpec extends Specification("Record Field Specification") {
}
"CountryField" should {
- val rec = FieldTypeTestRecord.createRecord
- val country = Countries.Canada
- passBasicTests(country, rec.mandatoryCountryField, rec.legacyOptionalCountryField, rec.optionalCountryField)
- passConversionTests(
- country,
- rec.mandatoryCountryField,
- Str(country.toString),
- JInt(country.id),
- Full(<select tabindex="1" name=".*" id="mandatoryCountryField_id"><option value=".*" selected="selected">{country.toString}</option></select>)
- )
+ val session = new LiftSession("", randomString(20), Empty)
+ S.initIfUninitted(session){
+ val rec = FieldTypeTestRecord.createRecord
+ val country = Countries.Canada
+ passBasicTests(country, rec.mandatoryCountryField, rec.legacyOptionalCountryField, rec.optionalCountryField)
+ passConversionTests(
+ country,
+ rec.mandatoryCountryField,
+ Str(country.toString),
+ JInt(country.id),
+ Full(<select tabindex="1" name=".*" id="mandatoryCountryField_id"><option value=".*" selected="selected">{country.toString}</option></select>)
+ )
+ }
}
"DateTimeField" should {
Oops, something went wrong.

0 comments on commit 35ea02d

Please sign in to comment.