From bf0b9fcf84d346231db868e522dce17ded59888e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 31 Oct 2011 18:26:41 +0000 Subject: Fixes NPE using iterator with an XML attribute ... Fixes NPE using iterator with an XML attribute being null or None ) (SI-5052 Also fixes incorrect size method (SI-5115 ) Contributed by Jordi Salvat i Alabart. Closes SI-5052, SI-5115, no review. --- test/files/run/t5052.scala | 6 ++++++ test/files/run/t5115.scala | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/files/run/t5052.scala create mode 100644 test/files/run/t5115.scala (limited to 'test/files/run') diff --git a/test/files/run/t5052.scala b/test/files/run/t5052.scala new file mode 100644 index 0000000000..9e418e8ac5 --- /dev/null +++ b/test/files/run/t5052.scala @@ -0,0 +1,6 @@ +object Test extends App { + assert( xml_== ) + assert( xml_== ) + assert( xml_== ) + assert( xml_== ) +} diff --git a/test/files/run/t5115.scala b/test/files/run/t5115.scala new file mode 100644 index 0000000000..cf25214715 --- /dev/null +++ b/test/files/run/t5115.scala @@ -0,0 +1,14 @@ +import scala.collection.Iterable + +object Test extends App { + def assertHonorsIterableContract(i: Iterable[_]) = assert(i.size == i.iterator.size) + + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) + assertHonorsIterableContract(.attributes) +} -- cgit v1.2.3