Skip to content
Merged
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
7 changes: 3 additions & 4 deletions src/main/scala/stdlib/Asserts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ object Asserts extends FlatSpec with Matchers with exercise.Section {

/** Booleans in asserts can test equality.
*/
def booleansAsserts(res0: String) {
def booleanAsserts(res0: Int) {
val v1 = 4
val v2 = 4
v1 === res0
v1 shouldEqual res0

/** `===` is an assert. It is from ScalaTest, not from the Scala language. */
/** `shouldEqual` is an assertion. It is from ScalaTest, not from the Scala language. */
}

/** Sometimes we expect you to fill in the values
Expand Down
5 changes: 3 additions & 2 deletions src/test/scala/exercises/stdlib/AssertsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ class AssertsSpec extends Spec with Checkers {
check(Test.testSuccess(Asserts.scalaTestAsserts _, true :: HNil))
}

// FIXME: depends on #259
// check(testSuccess(Asserts.booleansAsserts _, HNil))
def `boolean asserts` = {
check(Test.testSuccess(Asserts.booleanAsserts _, 4 :: HNil))
}

def `values asserts` = {
check(Test.testSuccess(Asserts.valuesAsserts _, 2 :: HNil))
Expand Down