From 687e65fb3c45ba90a6ce00d59b84c54918ea89cd Mon Sep 17 00:00:00 2001 From: michelou Date: Wed, 7 Mar 2007 17:42:17 +0000 Subject: fixed 2 bugs in classs BitSet and added scalado... fixed 2 bugs in classs BitSet and added scaladoc comment methods isInstanceOf and synchronized --- test/files/run/bitsets.scala | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/files/run/bitsets.scala (limited to 'test/files/run/bitsets.scala') 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) +} + +//############################################################################ -- cgit v1.2.3