Skip to content

Options section error #13

Closed
Closed
@idarlington

Description

@idarlington

Hi,

def matchOptions(res0: Float, res1: Float) {
    val someValue: Option[Double] = Some(20.0)
    val value = someValue match {
      case Some(v)  v
      case None     0.0
    }
    value should be(res0)
    val noValue: Option[Double] = None
    val value1 = noValue match {
      case Some(v)  v
      case None     0.0
    }
    value1 should be(res1)
  }

The above test in the options exercise throws an error because the test is comparing a Float to a Double value1 should be(res1) and most persons input their answers as Double.

I could put in a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions