quicksort

This commit is contained in:
Mariusz Pacek committed 2013-07-20 21:07:37 +02:00
1 parent 895158d6ef
commit 0cecb89ea9
30 files changed
+172 -1328

No files matched your search

@@ -1,8 +1,6 @@
[debug] Other repositories:
[debug] Default repositories:
[debug]  Raw(ProjectResolver(inter-project, mapped: ))
[debug]  URLRepository(typesafe-ivy-releases,Patterns(ivyPatterns=List(http://repo.typesafe.com/typesafe/ivy-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(http://repo.typesafe.com/typesafe/ivy-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false))
[debug]  URLRepository(sbt-plugin-releases,Patterns(ivyPatterns=List(http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false))
[debug]  FileRepository(local,FileConfiguration(true,None),Patterns(ivyPatterns=List(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false))
[debug]  Sonatype snapshots: http://oss.sonatype.org/content/repositories/snapshots/
[debug]  public: http://repo1.maven.org/maven2/
File diff suppressed because it is too large. Load diff
+10
View File
@@ -34,3 +34,13 @@ test:test-quick
test
test:test-quick
test
test\
test
test\
test
run
test
last test
test:compile
test:console
test
Binary file not shown.
Binary file not shown.
+4 -2
View File
@@ -1,5 +1,7 @@
#Successful Tests
#Sat Jul 20 01:09:52 CEST 2013
#Sat Jul 20 20:11:51 CEST 2013
scala.algo.ex1.tests.margetSortTest=1374255179357
scala.algo.ex1.tests.MergeSortTest=1374275392363
scala.algo.ex1.tests.BubbleSortTest=1374343909772
scala.algo.ex1.tests.MergeSortTest=1374343911792
scala.algo.ex1.tests.QuickSortTest=1374275392345
scala.algo.ex2.QuickSortTest=1374343910627
Binary file not shown.
Binary file not shown.
+3 -19
View File
@@ -2,30 +2,14 @@
[debug] Initial source changes: 
[debug]  removed:Set()
[debug]  added: Set()
[debug]  modified: Set(/home/mar/coursera/algo/ex1/src/main/scala/scala/algo/ex0/BubbleSort.scala)
[debug]  modified: Set()
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set(/home/mar/coursera/algo/ex1/src/main/scala/scala/algo/ex0/BubbleSort.scala)
[debug] Initial directly invalidated sources: Set()
[debug] 
[debug] Sources indirectly invalidated by:
[debug]  product: Set()
[debug]  binary dep: Set()
[debug]  external source: Set()
[debug] All initially invalidated sources: Set(/home/mar/coursera/algo/ex1/src/main/scala/scala/algo/ex0/BubbleSort.scala)
[info] Compiling 1 Scala source to /home/mar/coursera/algo/ex1/target/scala-2.10/classes...
[debug] Running cached compiler 79d5413f, interfacing (CompilerInterface) with Scala compiler version 2.10.2
[debug] Calling Scala compiler with arguments (CompilerInterface):
[debug]  -d
[debug]  /home/mar/coursera/algo/ex1/target/scala-2.10/classes
[debug]  -bootclasspath
[debug]  /usr/lib/jvm/java-7-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/netx.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/plugin.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/rhino.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jfr.jar:/usr/lib/jvm/java-7-openjdk/jre/classes:/home/mar/.sbt/boot/scala-2.10.2/lib/scala-library.jar
[debug]  -classpath
[debug]  /home/mar/coursera/algo/ex1/target/scala-2.10/classes
[debug] Scala compilation took 0.586942657 s
[debug] Step 2 changed sources and immdediate dependencies:
[debug]  Set()
[debug] Non-trivial strongly connected components: 
[debug]  
[debug] Step 2 invalidated sources:
[debug]  Set()
[debug] All initially invalidated sources: Set()
+31 -11
View File
@@ -1,11 +1,31 @@
[info] Running scala.algo.ex1.Ex1 
[debug] Starting sandboxed run...
[debug] Waiting for threads to exit or System.exit to be called.
[debug]  Classpath:
[debug]  /home/mar/coursera/algo/ex1/target/scala-2.10/classes
[debug]  /home/mar/.sbt/boot/scala-2.10.2/lib/scala-library.jar
[debug] Waiting for thread run-main to exit
[debug]  Thread run-main exited.
[debug] Interrupting remaining threads (should be all daemons).
[debug] Sandboxed run complete..
[debug] Exited with code 0
java.lang.RuntimeException: No main class detected.
at scala.sys.package$.error(package.scala:27)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27$$anonfun$15.apply(Defaults.scala:521)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27$$anonfun$15.apply(Defaults.scala:521)
at scala.Option.getOrElse(Option.scala:108)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27.apply(Defaults.scala:521)
at sbt.Defaults$$anonfun$runTask$1$$anonfun$apply$27.apply(Defaults.scala:520)
at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:581)
at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:581)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
[error] (compile:run) No main class detected.
+19 -3
View File
@@ -2,14 +2,30 @@
[debug] Initial source changes: 
[debug]  removed:Set()
[debug]  added: Set()
[debug]  modified: Set()
[debug]  modified: Set(/home/mar/coursera/algo/ex1/src/test/scala/scala/algo/ex1/tests/QuickSortTest.scala)
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug] Initial directly invalidated sources: Set(/home/mar/coursera/algo/ex1/src/test/scala/scala/algo/ex1/tests/QuickSortTest.scala)
[debug] 
[debug] Sources indirectly invalidated by:
[debug]  product: Set()
[debug]  binary dep: Set()
[debug]  external source: Set()
[debug] All initially invalidated sources: Set()
[debug] All initially invalidated sources: Set(/home/mar/coursera/algo/ex1/src/test/scala/scala/algo/ex1/tests/QuickSortTest.scala)
[info] Compiling 1 Scala source to /home/mar/coursera/algo/ex1/target/scala-2.10/test-classes...
[debug] Running cached compiler 64cff4e8, interfacing (CompilerInterface) with Scala compiler version 2.10.2
[debug] Calling Scala compiler with arguments (CompilerInterface):
[debug]  -d
[debug]  /home/mar/coursera/algo/ex1/target/scala-2.10/test-classes
[debug]  -bootclasspath
[debug]  /usr/lib/jvm/java-7-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/netx.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/plugin.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/rhino.jar:/usr/lib/jvm/java-7-openjdk/jre/lib/jfr.jar:/usr/lib/jvm/java-7-openjdk/jre/classes:/home/mar/.sbt/boot/scala-2.10.2/lib/scala-library.jar
[debug]  -classpath
[debug]  /home/mar/coursera/algo/ex1/target/scala-2.10/test-classes:/home/mar/coursera/algo/ex1/target/scala-2.10/classes:/home/mar/.ivy2/cache/org.scalatest/scalatest_2.10/jars/scalatest_2.10-1.9.1.jar:/home/mar/.ivy2/cache/org.scala-lang/scala-actors/jars/scala-actors-2.10.0.jar:/home/mar/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.0.jar
[debug] Scala compilation took 1.543904554 s
[debug] Step 2 changed sources and immdediate dependencies:
[debug]  Set()
[debug] Non-trivial strongly connected components: 
[debug]  
[debug] Step 2 invalidated sources:
[debug]  Set()
@@ -1,2 +1,2 @@
[debug] Subclass fingerprints: Stream((org.scalatest.Suite,false,org.scalatest.tools.ScalaTestFramework$$anon$1@73ba1748), ?)
[debug] Annotation fingerprints: Stream((org.scalatest.WrapWith,false,org.scalatest.tools.ScalaTestFramework$$anon$2@3e4eb353), ?)
[debug] Subclass fingerprints: Stream((org.scalatest.Suite,false,org.scalatest.tools.ScalaTestFramework$$anon$1@1f6b9be5), ?)
[debug] Annotation fingerprints: Stream((org.scalatest.WrapWith,false,org.scalatest.tools.ScalaTestFramework$$anon$2@51c7e780), ?)
+5 -7
View File
@@ -1,10 +1,8 @@
[debug] Running Test scala.algo.ex1.tests.MergeSortTest : subclass(false, org.scalatest.Suite) with arguments 
[debug] Running Test scala.algo.ex1.tests.BubbleSortTest : subclass(false, org.scalatest.Suite) with arguments 
[debug] Running Test scala.algo.ex1.tests.QuickSortTest : subclass(false, org.scalatest.Suite) with arguments 
[error] Failed: : Total 8, Failed 4, Errors 0, Passed 4, Skipped 0
[debug] Running Test scala.algo.ex1.tests.MergeSortTest : subclass(false, org.scalatest.Suite) with arguments 
[debug] Running Test scala.algo.ex2.QuickSortTest : subclass(false, org.scalatest.Suite) with arguments 
[info] Passed: : Total 13, Failed 0, Errors 0, Passed 13, Skipped 0
[debug] Passed tests:
[debug]  scala.algo.ex1.tests.QuickSortTest
[debug]  scala.algo.ex2.QuickSortTest
[debug]  scala.algo.ex1.tests.BubbleSortTest
[debug]  scala.algo.ex1.tests.MergeSortTest
[error] Failed tests:
[error]  scala.algo.ex1.tests.BubbleSortTest
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
@@ -1,10 +1,4 @@
[info] BubbleSortTest:
[info] - given array 1 should be unchanged
[info] - given array 1,2 should be unchanged *** FAILED ***
[info]  org.scalatest.exceptions.TestFailedException was thrown. (BubbleSortTest.scala:34)
[info] - given array 1,-1 should be -1,1 *** FAILED ***
[info]  org.scalatest.exceptions.TestFailedException was thrown. (BubbleSortTest.scala:45)
[info] - given array 1,2,3,6,2,6,3 should be 1,2,2,3,3,6,6 *** FAILED ***
[info]  org.scalatest.exceptions.TestFailedException was thrown. (BubbleSortTest.scala:56)
[info] - given array 1,2,3,6,2,6,3 should be 1,2,2,3,3,6f,6 *** FAILED ***
[info]  org.scalatest.exceptions.TestFailedException was thrown. (BubbleSortTest.scala:67)
[info] - given array 1,2 should be unchanged
[info] - given array 1,-1 should be -1,1