diff options
author | michelou <michelou@epfl.ch> | 2007-03-07 17:42:17 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-03-07 17:42:17 +0000 |
commit | 687e65fb3c45ba90a6ce00d59b84c54918ea89cd (patch) | |
tree | 008dbde95c38c40933a268c8f1147c63b4d52f0e /test/files | |
parent | 198906fb11ee6a5848381ffea95d17003992799f (diff) | |
download | scala-687e65fb3c45ba90a6ce00d59b84c54918ea89cd.tar.gz scala-687e65fb3c45ba90a6ce00d59b84c54918ea89cd.tar.bz2 scala-687e65fb3c45ba90a6ce00d59b84c54918ea89cd.zip |
fixed 2 bugs in classs BitSet and added scalado...
fixed 2 bugs in classs BitSet and added scaladoc comment methods
isInstanceOf and synchronized
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/bitsets.check | 9 | ||||
-rw-r--r-- | test/files/run/bitsets.scala | 30 |
2 files changed, 39 insertions, 0 deletions
diff --git a/test/files/run/bitsets.check b/test/files/run/bitsets.check new file mode 100644 index 0000000000..31b718b19d --- /dev/null +++ b/test/files/run/bitsets.check @@ -0,0 +1,9 @@ +s0 = Set() +s1 = Set(2) +s2 = Set(2) +xs0 = List() +xs1 = List(2) +xs2 = List(2) +ys0 = List(0) +ys1 = List(4) +ys2 = List(4) diff --git a/test/files/run/bitsets.scala b/test/files/run/bitsets.scala new file mode 100644 index 0000000000..3b27bf7629 --- /dev/null +++ b/test/files/run/bitsets.scala @@ -0,0 +1,30 @@ +//############################################################################ +// Bitsets +//############################################################################ +// $Id$ + +//############################################################################ + +object Test extends Application { + import scala.collection.mutable.{BitSet => MBitSet} + import scala.collection.immutable.BitSet + + val s0 = new BitSet(8, 8, null, false) + val s1 = new MBitSet(8) + val s2 = new BitSet(8, 8, Array(4), false) + s1 += 2 + + Console.println("s0 = " + s0) + Console.println("s1 = " + s1) + Console.println("s2 = " + s2) + + Console.println("xs0 = " + s0.elements.toList) + Console.println("xs1 = " + s1.elements.toList) + Console.println("xs2 = " + s2.elements.toList) + + Console.println("ys0 = " + s0.toArray.toList) + Console.println("ys1 = " + s1.toArray.toList) + Console.println("ys2 = " + s2.toArray.toList) +} + +//############################################################################ |