scala - Is there a better way to check if a number should be inside a range, in scalatest? -


say wanna check if result (an integer) should >=4 , <=15, can write such assertion in scalatest test:

assert(num >= 4) assert(num <= 15) 

it works can improved in opinion. there better way check in scalatest?

this maybe: assert(4 5 contains res.toint)?


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -