diff options
author | Miles Sabin <miles@milessabin.com> | 2009-07-27 18:36:37 +0000 |
---|---|---|
committer | Miles Sabin <miles@milessabin.com> | 2009-07-27 18:36:37 +0000 |
commit | c4a59834b97f9db5cb75e0f3e5bf268faff52383 (patch) | |
tree | b3aff5622a00e4fee0d89ec9095490051c2b4124 /test | |
parent | 68c289a95f70c5cd60f77dc251b3631504d3b59c (diff) | |
download | scala-c4a59834b97f9db5cb75e0f3e5bf268faff52383.tar.gz scala-c4a59834b97f9db5cb75e0f3e5bf268faff52383.tar.bz2 scala-c4a59834b97f9db5cb75e0f3e5bf268faff52383.zip |
Fix for another positions issue; added some pos...
Fix for another positions issue; added some positions unit tests; added
test.positions target to build.xml which validates positions of all
sources in the Scala tree; cleaned up -Yide-debug output for use in the
previous item.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/positions/Anon.scala | 9 | ||||
-rw-r--r-- | test/files/positions/Enclosing1.scala | 5 | ||||
-rw-r--r-- | test/files/positions/Enclosing2.scala | 5 | ||||
-rw-r--r-- | test/files/positions/Enclosing3.scala | 1 | ||||
-rw-r--r-- | test/files/positions/Overlap1.scala | 5 | ||||
-rw-r--r-- | test/files/positions/Overlap2.scala | 3 | ||||
-rw-r--r-- | test/files/positions/SyntheticNonSynthetic1.scala | 3 | ||||
-rw-r--r-- | test/files/positions/SyntheticNonSynthetic2.scala | 3 | ||||
-rw-r--r-- | test/files/positions/Unpositioned1.scala | 3 |
9 files changed, 37 insertions, 0 deletions
diff --git a/test/files/positions/Anon.scala b/test/files/positions/Anon.scala new file mode 100644 index 0000000000..940fff035a --- /dev/null +++ b/test/files/positions/Anon.scala @@ -0,0 +1,9 @@ +object Anon { + trait Foo { + val bar : Int + } + + def foo = new Foo { + override val bar = 23 + } +} diff --git a/test/files/positions/Enclosing1.scala b/test/files/positions/Enclosing1.scala new file mode 100644 index 0000000000..e170187d60 --- /dev/null +++ b/test/files/positions/Enclosing1.scala @@ -0,0 +1,5 @@ +object Enclosing1 { + do { + + } while (true) +} diff --git a/test/files/positions/Enclosing2.scala b/test/files/positions/Enclosing2.scala new file mode 100644 index 0000000000..502df5dc97 --- /dev/null +++ b/test/files/positions/Enclosing2.scala @@ -0,0 +1,5 @@ +object Enclosing2 { + + class C + trait T { this : C => } +} diff --git a/test/files/positions/Enclosing3.scala b/test/files/positions/Enclosing3.scala new file mode 100644 index 0000000000..a6fbd4bb20 --- /dev/null +++ b/test/files/positions/Enclosing3.scala @@ -0,0 +1 @@ +class Enclosing3[T <% String] {} diff --git a/test/files/positions/Overlap1.scala b/test/files/positions/Overlap1.scala new file mode 100644 index 0000000000..6fda17d861 --- /dev/null +++ b/test/files/positions/Overlap1.scala @@ -0,0 +1,5 @@ +object Overlap1 { + val l = List("foo") + val p = true + for(e <- l if p) yield e.length +} diff --git a/test/files/positions/Overlap2.scala b/test/files/positions/Overlap2.scala new file mode 100644 index 0000000000..4b77d04972 --- /dev/null +++ b/test/files/positions/Overlap2.scala @@ -0,0 +1,3 @@ +object Overlap2 { + for(a <- Some("foo") ; (b, c) = (1, 2)) {} +} diff --git a/test/files/positions/SyntheticNonSynthetic1.scala b/test/files/positions/SyntheticNonSynthetic1.scala new file mode 100644 index 0000000000..0d87c8ae79 --- /dev/null +++ b/test/files/positions/SyntheticNonSynthetic1.scala @@ -0,0 +1,3 @@ +object SyntheticNonSynthetic1 { + val foo : List[Class[_ <: Throwable]] = Nil +} diff --git a/test/files/positions/SyntheticNonSynthetic2.scala b/test/files/positions/SyntheticNonSynthetic2.scala new file mode 100644 index 0000000000..ba53186f84 --- /dev/null +++ b/test/files/positions/SyntheticNonSynthetic2.scala @@ -0,0 +1,3 @@ +object SyntheticNonSynthetic2 { + def foo[A >: Exception] (a : A) {} +} diff --git a/test/files/positions/Unpositioned1.scala b/test/files/positions/Unpositioned1.scala new file mode 100644 index 0000000000..7fc520e93c --- /dev/null +++ b/test/files/positions/Unpositioned1.scala @@ -0,0 +1,3 @@ +object Unpositioned1 { + for (a <- Some("foo") ; val b = true) {} +} |