aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/scala/async/neg/LocalClasses0Spec.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-11-26 14:05:04 +0100
committerJason Zaugg <jzaugg@gmail.com>2012-11-26 16:25:16 +0100
commitbe275dcf295f0addf8d41c9a3b4cfe2acaadfaa4 (patch)
tree70426486df39db37860ab90f15ecb41ff51994c1 /src/test/scala/scala/async/neg/LocalClasses0Spec.scala
parent4da04eee1893ead433a624f6b146d56aca46cb7e (diff)
downloadscala-async-be275dcf295f0addf8d41c9a3b4cfe2acaadfaa4.tar.gz
scala-async-be275dcf295f0addf8d41c9a3b4cfe2acaadfaa4.tar.bz2
scala-async-be275dcf295f0addf8d41c9a3b4cfe2acaadfaa4.zip
Rewrite the state machine to a class, rather than an object.
To avoid suprises in tree retyping, the instance of this class is immediately upcase to StateMachine[Promise[T], ExecContext]. Allow nested non-case classes. These pop up when we use nested async calls. Only look for duplicate names in the subtrees traversed by AsyncTraverser.
Diffstat (limited to 'src/test/scala/scala/async/neg/LocalClasses0Spec.scala')
-rw-r--r--src/test/scala/scala/async/neg/LocalClasses0Spec.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/scala/scala/async/neg/LocalClasses0Spec.scala b/src/test/scala/scala/async/neg/LocalClasses0Spec.scala
index 06a0e71..2569303 100644
--- a/src/test/scala/scala/async/neg/LocalClasses0Spec.scala
+++ b/src/test/scala/scala/async/neg/LocalClasses0Spec.scala
@@ -18,7 +18,7 @@ class LocalClasses0Spec {
@Test
def `reject a local class`() {
- expectError("Local class Person illegal within `async` block", "-cp target/scala-2.10/classes -deprecation -Xfatal-warnings") {
+ expectError("Local case class Person illegal within `async` block") {
"""
| import scala.concurrent.ExecutionContext.Implicits.global
| import scala.async.Async._
@@ -32,7 +32,7 @@ class LocalClasses0Spec {
@Test
def `reject a local class 2`() {
- expectError("Local class Person illegal within `async` block", "-cp target/scala-2.10/classes -deprecation -Xfatal-warnings") {
+ expectError("Local case class Person illegal within `async` block") {
"""
| import scala.concurrent.{Future, ExecutionContext}
| import ExecutionContext.Implicits.global
@@ -50,7 +50,7 @@ class LocalClasses0Spec {
@Test
def `reject a local class 3`() {
- expectError("Local class Person illegal within `async` block", "-cp target/scala-2.10/classes -deprecation -Xfatal-warnings") {
+ expectError("Local case class Person illegal within `async` block") {
"""
| import scala.concurrent.{Future, ExecutionContext}
| import ExecutionContext.Implicits.global
@@ -68,7 +68,7 @@ class LocalClasses0Spec {
@Test
def `reject a local class with symbols in its name`() {
- expectError("Local class :: illegal within `async` block", "-cp target/scala-2.10/classes -deprecation -Xfatal-warnings") {
+ expectError("Local case class :: illegal within `async` block") {
"""
| import scala.concurrent.{Future, ExecutionContext}
| import ExecutionContext.Implicits.global
@@ -86,7 +86,7 @@ class LocalClasses0Spec {
@Test
def `reject a nested local class`() {
- expectError("Local class Person illegal within `async` block", "-cp target/scala-2.10/classes -deprecation -Xfatal-warnings") {
+ expectError("Local case class Person illegal within `async` block") {
"""
| import scala.concurrent.{Future, ExecutionContext}
| import ExecutionContext.Implicits.global
@@ -110,7 +110,7 @@ class LocalClasses0Spec {
@Test
def `reject a local singleton object`() {
- expectError("Local object Person illegal within `async` block", "-cp target/scala-2.10/classes -deprecation -Xfatal-warnings") {
+ expectError("Local object Person illegal within `async` block") {
"""
| import scala.concurrent.ExecutionContext.Implicits.global
| import scala.async.Async._