From 4dc345743e06df4da7e836452a9ecbd62836a754 Mon Sep 17 00:00:00 2001
From: Etienne Kneuss <colder@php.net>
Date: Thu, 7 Aug 2014 15:41:43 +0200
Subject: [PATCH] Fix ordering bug, fix test options

---
 build.sbt                                 | 8 ++++----
 src/main/scala/leon/utils/Positions.scala | 8 +++++++-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/build.sbt b/build.sbt
index 27e8fb539..b0423e0ad 100644
--- a/build.sbt
+++ b/build.sbt
@@ -30,13 +30,13 @@ libraryDependencies ++= Seq(
 
 Keys.fork in run := true
 
-Keys.fork in test := true
+Keys.fork in Test := true
 
-logBuffered in test := false
+logBuffered in Test := false
 
-testOptions in test += Tests.Argument("-oD")
+testOptions in Test += Tests.Argument("-oDF")
 
-javaOptions in test += "-Xss32M"
+javaOptions in Test += "-Xss32M"
 
 parallelExecution in test := false
 
diff --git a/src/main/scala/leon/utils/Positions.scala b/src/main/scala/leon/utils/Positions.scala
index f5241de64..c38d1ab53 100644
--- a/src/main/scala/leon/utils/Positions.scala
+++ b/src/main/scala/leon/utils/Positions.scala
@@ -19,7 +19,13 @@ abstract class Position extends Ordered[Position] {
         ld
       }
     } else {
-      0
+      if (this.file eq null) {
+        -1
+      } else if (that.file eq null) {
+        +1
+      } else {
+        this.file.getPath.compare(that.file.getPath)
+      }
     }
   }
 
-- 
GitLab