Skip to content

Instantly share code, notes, and snippets.

@clhodapp
Created January 9, 2014 01:42
Show Gist options
  • Save clhodapp/8327978 to your computer and use it in GitHub Desktop.
Save clhodapp/8327978 to your computer and use it in GitHub Desktop.
[info] Loading global plugins from /Users/clhodapp/.sbt/0.13/plugins
[info] Set current project to tmp (in build file:/Users/clhodapp/tmp/)
> set libraryDependencies += "junit" % "junit" % "latest.release"
[info] Defining *:libraryDependencies
[info] The new value will be used by *:allDependencies
[info] Reapplying settings...
[info] Set current project to tmp (in build file:/Users/clhodapp/tmp/)
> console
[info] Updating {file:/Users/clhodapp/tmp/}tmp...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading http://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.jar ...
[info] [SUCCESSFUL ] junit#junit;4.11!junit.jar (862ms)
[info] downloading http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar ...
[info] [SUCCESSFUL ] org.hamcrest#hamcrest-core;1.3!hamcrest-core.jar (398ms)
[info] Done updating.
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import org.junit.Assert._
import org.junit.Assert._
scala> assertEquals(-0.0, 0.0)
warning: there were 1 deprecation warning(s); re-run with -deprecation for details
java.lang.AssertionError: Use assertEquals(expected, actual, delta) to compare floating-point numbers
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertEquals(Assert.java:576)
at org.junit.Assert.assertEquals(Assert.java:565)
at .<init>(<console>:11)
at .<clinit>(<console>)
at .<init>(<console>:7)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:734)
at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:983)
at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:604)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:756)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:801)
at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:713)
at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:577)
at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:584)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:587)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:878)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833)
at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:833)
at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:900)
at xsbt.ConsoleInterface.run(ConsoleInterface.scala:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:77)
at sbt.Console.sbt$Console$$console0$1(Console.scala:23)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:24)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:24)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:24)
at sbt.Logger$$anon$4.apply(Logger.scala:90)
at sbt.TrapExit$App.run(TrapExit.scala:244)
at java.lang.Thread.run(Thread.java:744)
scala> assertEquals(-0.0, 0.0, 0.0)
scala> 0.0 == -0.0
res2: Boolean = true
scala> 0.0 equals -0.0
res3: Boolean = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment