Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing all of the compilation issues. #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ ENV/

# sbt specific
target/
project/target
project/
1 change: 0 additions & 1 deletion project/build.properties

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/scala/Mathematics/AbsMax.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ object AbsMax {
* @param listOfElements
* @return
*/
def absMax(elements : List[Int]): Int = abs(elements.maxBy(x => abs(x)))
def absMax(elements : List[Int]): Int = Abs.abs(elements.maxBy(x => Abs.abs(x)))

}
2 changes: 1 addition & 1 deletion src/main/scala/Mathematics/AbsMin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ object AbsMin {
* @param listOfElements
* @return
*/
def absMin(elements : List[Int]): Int = abs(elements.minBy(x => abs(x)))
def absMin(elements : List[Int]): Int = Abs.abs(elements.minBy(x => Abs.abs(x)))

}
15 changes: 0 additions & 15 deletions src/test/scala/Array/MaximumAbsoluteDifferenceSpec.scala

This file was deleted.

15 changes: 15 additions & 0 deletions src/test/scala/ArrayTest/MaximumAbsoluteDifferenceSpec.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ArrayTest

import org.scalatest.FlatSpec

class MaximumAbsoluteDifferenceSpec extends FlatSpec {

it should "output the correct Integer as a result" in {
//assert(MaximumAbsoluteDifferenceSpec.maxAbsDiff(Array(1, 3, -1) === 5)
}

it should "output the correct Integer as a result v2" in {
//assert(MaximumAbsoluteDifferenceSpec.maxAbsDiff(Array(4, 3, 0, 9, -1, 6, -5)) === 17)
}

}
6 changes: 3 additions & 3 deletions src/test/scala/Mathematics/AbsMaxSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import org.scalatest.FlatSpec
class AbsMaxSpec extends FlatSpec {

it should "output the correct Integer as a result from the list of elements" in {
assert(AbsMax.absMax(-1000, -1, 999, 72, 65, -56, -767) === 1000)
assert(AbsMax.absMax(List(-1000, -1, 999, 72, 65, -56, -767)) === 1000)
}

it should "output the correct Integer as a result from the list of elements" in {
assert(AbsMax.absMax(121, 221, 3, 4112) === 4112)
it should "output the correct Integer as a result from the list of elements v2" in {
assert(AbsMax.absMax(List(121, 221, 3, 4112)) === 4112)
}

}
6 changes: 3 additions & 3 deletions src/test/scala/Mathematics/AbsMinSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import org.scalatest.FlatSpec
class AbsMinSpec extends FlatSpec {

it should "output the correct Integer as a result from the list of elements" in {
assert(AbsMin.absMin(1000, -1, 999, 72, 65, -56, -767) === 1)
assert(AbsMin.absMin(List(1000, -1, 999, 72, 65, -56, -767)) === 1)
}

it should "output the correct Integer as a result from the list of elements" in {
assert(AbsMin.absMin(121, 221, 3, 4112) === 3)
it should "output the correct Integer as a result from the list of elements v2" in {
assert(AbsMin.absMin(List(121, 221, 3, 4112)) === 3)
}

}
2 changes: 1 addition & 1 deletion src/test/scala/Mathematics/AbsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.scalatest.FlatSpec

class AbsSpec extends FlatSpec {

it should "output the correct Integer as a result" in {
it should "output the correct Integer as a result: negative number" in {
assert(Abs.abs(-1) === 1)
}

Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/Mathematics/FindMaxSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import org.scalatest.FlatSpec
class FindMaxSpec extends FlatSpec {

it should "output the correct Integer as a result from the list of elements" in {
assert(FindMax.findMax(-1000, -1, 999, 72, 65, -56, -767) === 999)
assert(FindMax.findMax(List(-1000, -1, 999, 72, 65, -56, -767)) === 999)
}

it should "output the correct Integer as a result from the list of elements" in {
assert(FindMax.findMax(121, 221, 3, 4112) === 4112)
it should "output the correct Integer as a result from the list of elements v2" in {
assert(FindMax.findMax(List(121, 221, 3, 4112)) === 4112)
}

}
6 changes: 3 additions & 3 deletions src/test/scala/Mathematics/FindMinSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import org.scalatest.FlatSpec
class FindMinSpec extends FlatSpec {

it should "output the correct Integer as a result from the list of elements" in {
assert(FindMin.findMin(-1000, -1, 999, 72, 65, -56, -767) === -1000)
assert(FindMin.findMin(List(-1000, -1, 999, 72, 65, -56, -767)) === -1000)
}

it should "output the correct Integer as a result from the list of elements" in {
assert(FindMin.findMin(121, 221, 3, 4112) === 3)
it should "output the correct Integer as a result from the list of elements v2" in {
assert(FindMin.findMin(List(121, 221, 3, 4112)) === 3)
}

}
2 changes: 1 addition & 1 deletion src/test/scala/Mathematics/GreaterCommonDivisorSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class GreaterCommonDivisorSpec extends FlatSpec {
assert(GreaterCommonDivisor.gcd(80, 10) === 10)
}

it should "output the correct Integer as a result Greatest Common Divisor of two numbers" in {
it should "output the correct Integer as a result Greatest Common Divisor of two numbers v2" in {
assert(GreaterCommonDivisor.gcd(7, 95) === 1)
}

Expand Down