diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2009-12-21 15:35:16 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2009-12-21 15:35:16 +0000 |
commit | d3e129a5fb36030d3a05ee59ccf353095125d622 (patch) | |
tree | f92ff3325831065b86de67d504a8da792c16c430 /test/files/pos/selftails.scala | |
parent | 2ab456d13df1ac50539e4620f62f6e234f3c8446 (diff) | |
download | scala-d3e129a5fb36030d3a05ee59ccf353095125d622.tar.gz scala-d3e129a5fb36030d3a05ee59ccf353095125d622.tar.bz2 scala-d3e129a5fb36030d3a05ee59ccf353095125d622.zip |
Merged revisions 20248,20250,20252-20256 via sv...
Merged revisions 20248,20250,20252-20256 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r20248 | odersky | 2009-12-20 19:11:24 +0100 (Sun, 20 Dec 2009) | 2 lines
Closed #2718 and #2765. review by extempore.
........
r20250 | extempore | 2009-12-21 01:05:03 +0100 (Mon, 21 Dec 2009) | 3 lines
Minimally integrated the semi-orphaned immutable.Stack into the
collections hierarchy and enabled it in the sequence tests. Closes
#2822. review by community. ........ r20252 | rytz | 2009-12-21 12:20:43
+0100 (Mon, 21 Dec 2009) | 1 line
close #2820
........
r20253 | odersky | 2009-12-21 13:53:20 +0100 (Mon, 21 Dec 2009) | 1 line
small cleanups. no review necessary.
........
r20254 | odersky | 2009-12-21 13:54:27 +0100 (Mon, 21 Dec 2009) | 1 line
Fixed lift 2.8 beta RC4 build problem. The problem was that
tailcalls assumed the wrong type for `this'. Review by dragos. Test in
selftails.scala. ........ r20255 | odersky | 2009-12-21 13:59:36 +0100
(Mon, 21 Dec 2009) | 1 line
Improved deprecated warnings. No review necessary. ........ r20256 |
phaller | 2009-12-21 16:30:00 +0100 (Mon, 21 Dec 2009) | 1 line
Documented scala.actors.Futures API. Closes #2506. Review by dubochet.
........
Diffstat (limited to 'test/files/pos/selftails.scala')
-rw-r--r-- | test/files/pos/selftails.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/pos/selftails.scala b/test/files/pos/selftails.scala new file mode 100644 index 0000000000..a4253b80c7 --- /dev/null +++ b/test/files/pos/selftails.scala @@ -0,0 +1,23 @@ +package net.liftweb.util + +/** +* This trait adds functionality to Scala standard types +*/ +trait BasicTypesHelpers { self: StringHelpers with ControlHelpers => + + /** + * Compare two arrays of Byte for byte equality. + * @return true if two Byte arrays contain the same bytes + */ + def isEq(a: Array[Byte], b: Array[Byte]) = { + def eq(a: Array[Byte], b: Array[Byte], pos: Int, len: Int): Boolean = { + if (pos == len) true + else if (a(pos) != b(pos)) false + else eq(a , b, pos + 1, len) + } + a.length == b.length && eq(a, b, 0, a.length) + } +} + +trait StringHelpers +trait ControlHelpers |