summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/resetattrs-this.check1
-rw-r--r--test/files/run/resetattrs-this.scala11
-rw-r--r--test/files/run/t6827.scala3
-rw-r--r--test/files/run/t7074.check9
-rw-r--r--test/files/run/t7074.scala15
5 files changed, 39 insertions, 0 deletions
diff --git a/test/files/run/resetattrs-this.check b/test/files/run/resetattrs-this.check
new file mode 100644
index 0000000000..27ba77ddaf
--- /dev/null
+++ b/test/files/run/resetattrs-this.check
@@ -0,0 +1 @@
+true
diff --git a/test/files/run/resetattrs-this.scala b/test/files/run/resetattrs-this.scala
new file mode 100644
index 0000000000..12afa3d712
--- /dev/null
+++ b/test/files/run/resetattrs-this.scala
@@ -0,0 +1,11 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val tree = Select(This(cm.staticPackage("scala").moduleClass), newTermName("Predef"))
+ val ttree = tb.typeCheck(tree)
+ val rttree = tb.resetAllAttrs(ttree)
+ println(tb.eval(rttree) == Predef)
+} \ No newline at end of file
diff --git a/test/files/run/t6827.scala b/test/files/run/t6827.scala
index 7e8918e3dc..8e17af09e2 100644
--- a/test/files/run/t6827.scala
+++ b/test/files/run/t6827.scala
@@ -28,4 +28,7 @@ object Test extends App {
tryit("read -1", 0, -1)
tryit("invalid read 0", 30, 0)
tryit("invalid read -1", 30, -1)
+
+ // okay, see SI-7128
+ "...".toIterator.copyToArray(new Array[Char](0), 0, 0)
}
diff --git a/test/files/run/t7074.check b/test/files/run/t7074.check
new file mode 100644
index 0000000000..ab9cf11f16
--- /dev/null
+++ b/test/files/run/t7074.check
@@ -0,0 +1,9 @@
+<a/>
+<a b="2" c="3" d="1"/>
+<a b="2" c="4" d="1" e="3" f="5"/>
+<a b="5" c="4" d="3" e="2" f="1"/>
+<a b="1" c="2" d="3" e="4" f="5"/>
+<a a:b="2" a:c="3" a:d="1"/>
+<a a:b="2" a:c="4" a:d="1" a:e="3" a:f="5"/>
+<a a:b="5" a:c="4" a:d="3" a:e="2" a:f="1"/>
+<a a:b="1" a:c="2" a:d="3" a:e="4" a:f="5"/>
diff --git a/test/files/run/t7074.scala b/test/files/run/t7074.scala
new file mode 100644
index 0000000000..693a076a7a
--- /dev/null
+++ b/test/files/run/t7074.scala
@@ -0,0 +1,15 @@
+import scala.xml.Utility.sort
+
+object Test extends App {
+ println(sort(<a/>))
+ println(sort(<a d="1" b="2" c="3"/>))
+ println(sort(<a d="1" b="2" e="3" c="4" f="5"/>))
+ println(sort(<a f="1" e="2" d="3" c="4" b="5"/>))
+ println(sort(<a b="1" c="2" d="3" e="4" f="5"/>))
+
+ println(sort(<a a:d="1" a:b="2" a:c="3"/>))
+ println(sort(<a a:d="1" a:b="2" a:e="3" a:c="4" a:f="5"/>))
+ println(sort(<a a:f="1" a:e="2" a:d="3" a:c="4" a:b="5"/>))
+ println(sort(<a a:b="1" a:c="2" a:d="3" a:e="4" a:f="5"/>))
+}
+