Skip to content
Browse files

Cleanup

  • Loading branch information...
1 parent 4caf191 commit d12ef1909488ac07868464d4095aa9c09c62ad90 @retronym retronym committed Feb 25, 2012
View
2 src/main/scala/com/github/retronym/macrocosm/Macrocosm.scala
@@ -72,7 +72,7 @@ object Macrocosm {
* res0: Int = 42
* }}}
*/
- def macro b() = {
+ def macro b(): Int = {
def parseBinary(s: String): Option[Int] = {
var i = s.length - 1
var sum = 0
View
12 src/test/scala/com/github/retronym/macrocosm/MacrocosmTest.scala
@@ -3,27 +3,27 @@ package com.github.retronym.macrocosm
object MacrocosmTest extends App {
import Macrocosm._
- val s = desugar(List(1, 2, 3).reverse)
+ val s = desugar(List(1, 2, 3).reverse)
println(s) // immutable.this.List.apply[Int](1, 2, 3).reverse
val b: Boolean = log("".isEmpty) // prints "".isEmpty() = true
-
+
try {
- assert1("boo".reverse == "obb")
+ assert1("boo".reverse == "obb")
} catch {
case a: AssertionError => println(a.getMessage) // scala.this.Predef.augmentString("boo").reverse.==("obb")
}
try {
- assert2("boo".reverse == "obb");
+ assert2("boo".reverse == "obb");
} catch {
case a: AssertionError => println(a.getMessage) // assert2("boo".reverse == "obb")
}
-
+
def plus(a: Int, b: Int) = a + b
val i: Int = trace(plus(1, plus(2, 3)))
-
+
trace("foo".toString.toString)
trace(List(1, 2).reverse.reverse)

0 comments on commit d12ef19

Please sign in to comment.
Something went wrong with that request. Please try again.